1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alenkinab [10]
3 years ago
12

Write a program that asks the user to enter a number within the range of 1 through 10. Use a switch statement to display the Rom

an numeral version of that number. Input Validation: Do not accept a number less than 1 or greater than 10. Sample Run Enter a number (1 - 10): 7↵ The Roman numeral version of 7 us VII.↵
Computers and Technology
1 answer:
hjlf3 years ago
6 0

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.

You might be interested in
Which of the following is considered part of the process in the systems thinking example of a TPS?
asambeis [7]

Answer: Calculate

Explanation:

Calculate is the process of system thinking and it is an example of TPS. It is essential component of calculate the data transaction processing.

TPS stands for transaction processing system and it perform various function like data processing, performing various calculations and data transformation. It basically a transaction oriented and perform various transaction routine application.  

4 0
3 years ago
In which type of attack do you get malicious code in links from seemingly reliable websites?
natali 33 [55]

I think it is C. cross-site scripting

6 0
3 years ago
What is a computer briage coures​
Stella [2.4K]

what's your choices for this question

4 0
3 years ago
A(n) ______ is a type of collaborative website that allows users to create, add, modify, or delete website content.
andrey2020 [161]
<span>A wiki is this type of site. The users can, anonymously or with a profile, add to or delete content already posted. This gives the community the ability to add to the overall knowledge base on a specific subject. The site tracks changes through IP addresses to make sure that changes are not done maliciously.</span>
8 0
3 years ago
How does the zone theory of optical systems resolve the apparent incompatibility of trichromacy and opponency?
lara [203]

Answer:

Money money money

Explanation:

4 0
3 years ago
Other questions:
  • Tanya has received an email, apparently from her bank, stating that some of her records were lost during server maintenance work
    13·2 answers
  • You play guitar and keep two files on your computer. One file, called strings, lists the different brands of strings you keep on
    8·1 answer
  • 60 POINTS!
    13·1 answer
  • What is a major way that a consumer can protect himself/herself when getting a credit card? A) Making sure that they get a very
    8·1 answer
  • CAD workstations
    11·1 answer
  • the default name for the small icon that represents a web site or page, and is displayed in the browsers, typically at the begin
    9·1 answer
  • What is virtualization?
    11·2 answers
  • Hiiiiiiiiiiiiiiiiii <br>i'm new here!!!​
    14·2 answers
  • A form of segmentation that is based on user usage rate, user status, purchase occasion, and benefits sought is _________.
    13·1 answer
  • Cyber vulnerabilities to dod systems may include
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!