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
guapka [62]
2 years ago
8

Write a program num2rome.cpp that converts a positive integer into the Roman number system. The Roman number system has digits I

1 V 5 X 10 L 50 C 100 D 500 M 1,000 Numbers are formed according to the following rules: a. Only numbers 1 to 3,999 (inclusive) are represented. b. As in the decimal system, the thousands, hundreds, tens, and ones are express separately. c. The numbers 1 to 9 are expressed as I 1 II 2 III 3 IV 4 V 5 VI 6 VII 7 VIII 8 IX 9 As
Computers and Technology
1 answer:
Tom [10]2 years ago
8 0

Answer:

Explanation:

#include <stdio.h>  

int main(void)  

{    

   int num, rem;

   printf("Enter a number: ");

   scanf("%d", &num);

   printf("Roman numerals: ");        

   while(num != 0)

   {

       if (num >= 1000)       // 1000 - m

       {

          printf("m");

          num -= 1000;

       }

       else if (num >= 900)   // 900 -  cm

       {

          printf("cm");

          num -= 900;

       }        

       else if (num >= 500)   // 500 - d

       {            

          printf("d");

          num -= 500;

       }

       else if (num >= 400)   // 400 -  cd

       {

          printf("cd");

          num -= 400;

       }

       else if (num >= 100)   // 100 - c

       {

          printf("c");

          num -= 100;                        

       }

       else if (num >= 90)    // 90 - xc

       {

          printf("xc");

          num -= 90;                                              

       }

       else if (num >= 50)    // 50 - l

       {

          printf("l");

          num -= 50;                                                                      

       }

       else if (num >= 40)    // 40 - xl

       {

          printf("xl");            

          num -= 40;

       }

       else if (num >= 10)    // 10 - x

       {

          printf("x");

          num -= 10;            

       }

       else if (num >= 9)     // 9 - ix

       {

          printf("ix");

          num -= 9;                          

       }

       else if (num >= 5)     // 5 - v

       {

          printf("v");

          num -= 5;                                      

       }

       else if (num >= 4)     // 4 - iv

       {

          printf("iv");

          num -= 4;                                                            

       }

       else if (num >= 1)     // 1 - i

       {

          printf("i");

          num -= 1;                                                                                    

       }

   }

   return 0;

}

You might be interested in
Data mining must usestatistics to analyze data.<br> True<br> False
Rasek [7]

Answer: True

Explanation: In data mining, they use statistics component for the analyzing of the large amount of data and helps to deal with it. Statistics provide the techniques for the analyzing, evaluating and dealing with the data that is known as data mining.Data statistics provide the help to organize large data in a proper form and then analyze it. Thus, the statement given is true that data mining must use statistics to analyse data.

4 0
2 years ago
ZipCar uses cutting edge wireless technology combined with sophisticated data management and security techniques to assure that
Bingel [31]

Answer:

dependable

Explanation:

3 0
1 year ago
List and explain three ways study groups benefit your learning.
SashulF [63]

Answer:

Studying in groups can have many effective outcomes and be beneficial. Here are some ways studying in a group is benefical,

1.  More support, limits chances of procrastination

<u>      With many people, everyone is assigned a role or there is more determination by all peoples to get the work done than an individual being the only one responsible than many trying to accomplish the completion of the project. </u>

2. More people means more parts can get done effectively and taking notes is easier.

<u>      More people allow the work (depending on the project of assignment) for the work to get more focused and worked on faster with the designated roles given. </u>

3. More interactive and allows (sometimes an enjoyable times) and to even learn faster than independently.

      People, not all however, might like the company, there's support and even people skills is enhanced by being in the group.

3 0
2 years ago
Who is the father of computer?​
bagirrra123 [75]

Answer:

The first automatic digital computer has been designed by the English mathematician and inventor Charles Babbage. Babbage developed the Analytical Engine Plans for the mid-1830s.

Explanation:

  • Babbage has developed the concept of a digital, programmable computer and was a mathematician, philosopher, inventor, and mechanical engineer.
  • Some regard Babbage as a "computer father"
  • The inventing of its first mechanical computer, the difference engine, is attributable to Babbage, which eventually resulted in more complex electronic designs, although Babbage's Analytical Engine is the main source of ideas for modern computers. He was described as the "prime" among the numerous polymaths of his century by his varied work in another field.
7 0
2 years ago
Keystroke loggers are stealth software packages that are used to monitor keyboard activities. Which is the best location to plac
irina [24]

Answer: Keyboard hardware & the operating system

Explanation:Keystroke loggers is also referred as the monitoring system which is a for the inspection of the every key pressed on an operating system. This technology monitors the activities of keypad devices such as smart phones etc. It is also used for the surveillance of the unauthorized activities that are done by the hackers or criminals.

Thus the correct option is keyboard hardware and the operating system is the location of the placement of the key loggers.

7 0
3 years ago
Other questions:
  • When looking to ensure your website is easily accessible by mobile users, what should you focus on doing first
    8·1 answer
  • Which osi reference model layer includes all programs on a computer that interact with the network?
    13·1 answer
  • Wireless networks are the most difficult type of network to set up <br> true or false
    15·1 answer
  • Binary code what does this mean I was sick so I don't under stand
    7·2 answers
  • An example of an electrical insulator is _____.
    15·1 answer
  • (I made this up teehee) what anime is katski bakugo from
    15·2 answers
  • Which statement pertaining to system reliability is FALSE? Select one: A. Having the latest version of software products can mak
    15·1 answer
  • Did it surprise you to discover that the Sun is actually a star in the middle of its life cycle? Why or why not?
    8·1 answer
  • Hardware is found outside the system unit.​
    13·1 answer
  • PLEASE ANSWER
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!