Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introduction The purpose of the practice labs is to work on C programming and become more familiar with the coding and the debugging part using

image text in transcribedimage text in transcribedimage text in transcribed

Introduction The purpose of the practice labs is to work on C programming and become more familiar with the coding and the debugging part using C language. None of the labs in this course are graded since the solutions can be found on the Internet (some "nice" people decided to compromise the integrity of the programming assignments and upload the solutions on the Internet). Therefore, you do the labs only for yourself, to practice, to have fun and to learn. You do NOT have to submit anything. After you have worked on the Lab, check the attached solution. Let me know if you have any questions or issues with the program or its solution. I am always here to help all students, especially those who really take this class seriously and they want to advance in programming in the future. Instructions Write a program that asks the user to enter a number within the range of 1 through 10. Use if-else if statements to display the Roman numeral version of that number. Input Validation: Do not accept a number less than 1 or greater than 10. Prompts And Output Labels. Use the following prompt for input: "Enter a number in the range of 1 - 10: ". The output of the program should be just a Roman numeral, such as VII. Requirement: Your program name should be called Romanversion. (Again, after you have worked on the Lab, check the attached solution). \#include int main() \{ int number; printf("Enter a number in the range of 1 - 10: "); scanf("\%d", \&number); if (number 10){ printf("please rerun program and enter a number between 1-10"); \} else \{ if ( number ==1){ printf("I"); \} else if (number ==2 ) \{ printf("II"); \} else if (number ==3 ) \{ printf("III"); \} else if (number ==4 ) \{ printf("IV"); \} else if (number ==5){ printf("V"); \} else if (number ==6 ) \{ printf("VI"); \} else if (number ==7 ) \{ printf("VII"); \} else if (number ==8 ) \{ printf("VIII"); \} else if (number ==9 ) \{ printf("IX"); \} else if (number ==10 ) \{ printf("X"); \} \} return 0; \}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

7. What is Tobins q, and what does it have to do with investment?

Answered: 1 week ago