A table maker makes visually appealing tables such as line graphs, bar graphs, venn diagrams on a spreadsheet software.
Answer:
Below are the program for the above question:
Explanation:
#include <stdio.h>//header file.
int main()//main function.
{
int value; //variable declaration.
printf("Enter a number to find its roman value: ");//render a message for the user.
scanf("%d",&value); //take a value from the user.
switch(value)//switch case starts
{
case 1:
printf("I");
break;
case 2:
printf("II");
break;
case 3:
printf("III");
break;
case 4:
printf("IV");
break;
case 5:
printf("V");
break;
case 6:
printf("VI");
break;
case 7:
printf("VII");
break;
case 8:
printf("VIII");
break;
case 9:
printf("IX");
break;
case 10:
printf("X");
break;
}//switch case ends.
return 0;//return statement.
}
Output:
- If the user inputs as 4, then the output is "IV".
Code Explantion :
- The above code is in c language, in which the scanf function is used to take the inputs from the user.
- Then the value match from the switch case and display the suitable result.
- And the user get the roman value from the user.
Windows settings.
1234567890