Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ programming please! thx 5. [20 marks) Write a program that generates 100 random integers in the range [1, 999) and displays the number of

C++ programming please! thx image text in transcribed
5. [20 marks) Write a program that generates 100 random integers in the range [1, 999) and displays the number of single-digit numbers, the number of two-digit numbers, and the number of three- digit numbers that was generated on the screen. Set the seed of the random generator to the time of the system to make the program generate different sequence of numbers during different executions. Name your source file 05.cpp and save it in a folder named by your firstname lastname on your USB stick. 6. (17 marks] Write a program that repeatedly reads a character from the keyboard and proceeds as follows: If the input character is a newline character (e. the Enter key was pressed by the user), the program terminates, otherwise, the program displays the ASCII code of the input character on the screen and displays two other characters on the screen: The one that is before the character in the ASCII table and the one that comes after the character in the ASCII table. For example, if the user enters the character "B", the output of the program will be like: The ASCII code of Bis 66 and the characters before and after B in the ASCII table are A and c, respectively. Name your source file 06.cpp and save it in a folder named as your firstname lastname on your USB stick

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

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions

Question

Locate the centroid (x, y) of thearea. 3 in. 1 in. 6 in. -3 in.-

Answered: 1 week ago