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]
2 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:
hjlf2 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
What variation of a dictionary attack involves a dictionary attack combined with a brute force attack, and will slightly alter d
Galina-37 [17]

Answer:

D) Hybrid Attack

Explanation:

This type of  attack is a blend of both a dictionary and brute force attack. The meaning of this is, while a dictionary attack method would capture a wordlist of passwords, the brute-force attack would be applied to each of  password captured.

6 0
2 years ago
How to tell if screen or screen protector is cracked?
beks73 [17]
You will feel the screen protector crack
6 0
3 years ago
Read 2 more answers
find all breweries that specialize in a particular beer style. A brewer is considered specialized if they produce at least 10 be
kolbaska11 [484]

Answer:

select style_name,br.name as brewery,count(beer_id) as Num

from beerdb.beers be  

inner join beerdb.styles st

on be.style_id = st.style_id

join beerdb.breweries br on  

be.brewery_id = br.brewery_id

group by style_name , br.name  

having count(beer_id)>=10

order by style_name, num desc

Explanation:

7 0
3 years ago
G The method of mapping where each memory locationis mapped to exactly one location in the cache is
Otrada [13]

Answer:

Direct Mapped Cache

Explanation:

Given that a Direct Mapped Cache is a form of mapping whereby each main memory address is mapped into precisely one cache block.

It is considered cheaper compared to the associative method of cache mapping, and it is faster when searching through it. This is because it utilizes a tag field only.

Hence, The method of mapping where each memory location is mapped to exactly one location in the cache is "Direct Mapped Cache"

4 0
2 years ago
Help plzzzzzzzzzzzzzzzzzzzzzzzzz
Reil [10]

B, Parallel ports are faster than serial ports.

A parallel port can move a set of 8 bits at a time on eight different wires, it uses a 25 pin connector, called a DB-25 connector, whereas a serial port only has a DB-9 connector.

7 0
2 years ago
Other questions:
  • HELP PLEASE
    7·2 answers
  • What does ADF means????
    13·2 answers
  • What are the first two lines of defense a company should take when addressing security risks?
    10·1 answer
  • "_____ devices improve memory by encoding items in a special way."
    13·1 answer
  • /*
    8·1 answer
  • Which of the following information should be included in audit documentation? a. Procedures performed. b. Audit evidence examine
    13·1 answer
  • If you're unsure of what chart to use for a set of data, what feature does Excel include that will help you to decide?
    7·1 answer
  • Write a program that uses an initializer list to store the following set of numbers in an array named nums. Then, print the arra
    10·2 answers
  • Write python code that does the following: Ask the user to enter as many as number they want; Then find the sum and the average
    10·1 answer
  • What is the diffrent between ibm pc and ibm compatibles in table:​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!