Array and Strings – Physics – Problem #1

IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive

Difficulty: medium

Problem Statement

Write an interactive C program that converts a positive integer (to be read) , which is less than 500, to a Roman numeral. For example, 12 will be converted to XII, 14 will be converted to XIV, 56 will be converted to LVI, and so on. You should use only the following Roman numeral symbols: I - one, V - five, X - ten, L - fifty, C - 100. Design the program so that it executes repeatedly, until a value of zero is read in from the keyboard. Provide the output for the following sequence of numbers: 25, 48, 92, 243, 137, 337, 485, 7, 18, 50, 100, 200, 300, 400, 500, 0

Back to Lab Problems
Array and Strings/Physics/Problem #1

Lab Problem Statement

Specifications & Problem DetailsIIT Kharagpur PDS Archive
Loading question...

Interactive C Compiler · Problem #1

WASM In-Browser

Runs directly on your machine · Zero remote server dependency

Compiler downloads on first Run (large, saved in your browser after that)
main.cCtrl + Enter to run
1
2
3
4
5
6
7
Input (stdin)given to scanf / cin
Output

Output appears here. Press Run to compile and execute.