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
Written one please answer
Zinaida [17]

Answer:

So where the question????????

8 0
2 years ago
Which of the following is true of mobile commerce (m-commerce) applications? a. They are supported by short-range wireless commu
KATRIN_1 [288]

Answer:

Option A: They are supported by short-range wireless communication technologies.

Explanation:

M-commerce is a progression of e-commerce which is being used on vast scale now-a-days like in online shopping, online payments etc.

  • As m-commerce applications have facilitated so much, they also support short ranged communication technologies such as Bluetooth which allows the connectivity to internet as well as offers sharing among different devices.
  • m-commerce applications are also compatible with 3G and 4G and even they have been promoted in a remarkable way. As these generations provide much faster speed and better connection, they have added much more to the business.
  • m-commerce applications don't rely on voice recognition or text-to-text speech as they bother not to know who actually is interested. They rather make sure of payment methods to make the payments secure and certain.
  • The m-commerce is totally free from wired protocols as it uses handheld devices including cell phones, tablets or laptops. So that the mobility is ensured.
5 0
3 years ago
Do these devices allow you to view photos using the cloud?
ivann1987 [24]

Answer:

Yes, You can view the cloud on those devices

8 0
2 years ago
A broadcast network is one in which a transmission from any one attached station is received by all other attached stations over
love history [14]

Answer:

In a broadcast network such as radio network for example a walkie talkie, the broadcasted transmission is received equally by all receivers indiscriminately which may lead to dissemination of classified information to an unauthorized receiver, therefore, the network layer is required is needed to ensure proper routing of the information

Similarly, when the all the broadcasters in one location are each trying to send messages to different receivers at another given location, there would be potential for network congestion and it would be difficult to send information through the network

When there is need for priority service the presence of a network layer is needed in the network

However, when the above functions performed by the network layer is not required, then, the network layer can be excluded, such as the communication between layers 4 - 7 of the OSI model

Explanation:

8 0
3 years ago
I am a receptionist for a large corporation what career cluster is this in?
RSB [31]
Business and administration
4 0
2 years ago
Read 2 more answers
Other questions:
  • A ____ is harmful computer code that spreads without your interaction, slipping from one network to another and replicating itse
    15·1 answer
  • An effectively distributed resume will get an interview
    12·2 answers
  • A friend complains that she is always running out of money even though she “never buys anything expensive.” What advice would yo
    10·1 answer
  • A(n) _____ is a computer program that can damage files and programs on your computer.
    6·2 answers
  • Which option describes wearable technology?
    9·1 answer
  • Providing incentives for customers to learn more about your service is known as?
    7·1 answer
  • Select the correct navigational path to set the name for a cell range.
    15·2 answers
  • Can someone please help me I need to turn this in my 3:00pm Eastern time
    12·1 answer
  • Which statement describes what the Conditional Formatting option in Excel 2016 allows users to do?
    15·2 answers
  • WILL MARK BRAIN LIST!
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!