C For Loop Program With Output Devices