Docsity

Program Create the following program in C++ using OnlineGDB, Summaries of Engineering

Partial preview of the text

Download Program Create the following program in C++ using OnlineGDB and more Summaries Engineering in PDF only on Docsity!

Program

Create the following program in C++ using OnlineGDB

Program 1: No 5’s

Write a Program

Part 1: Write a program that continues to ask the user to enter

any number other than 5 until the user enters the number 5 >

Then tell the user "Hey! you weren't supposed to enter 5!" > exit the

program.

Part 2: Modify the program so that after 10 iterations if the user

still hasn't entered 5 will tell the user "Wow, you're more patient then I

am, you win." > then exit.

Program 2: Loop Mania

Write a program

Part 1: That it asks the user to enter any number other than the

number that is equal to the loop number. (i.e. on the first iteration

"Please enter any number other than 0" and on the second iteration

"Please enter any number other than 1" etc. etc. The program must

behave accordingly exiting when the user enters the number they were

asked not to.

Part 2: Output the total sum of the numbers entered minus (-) the

number used to exit the program.

Part 3: Ask the user “Would you like to play again? Y/N”

Program 3: TinkerCAD: Using an TinkerCAD with Arduino Board Create a program to do

the following

  1. Input: a. Screen: Allows user to input a value that represents the base number to an exponent b. Arduino: Turn On a LED ON for 3 seconds then OFF
  2. Input: a. Screen: Allows user to input a value that represents the exponent number to an exponent b. Arduino: Turn On a LED ON for 3 seconds c. Arduino: Turn Off a LED equal to the Base number*25ms d. Cycle Light Flashing 3 Times
  3. Output a. Show answer of the exponent b. Turn on the middle LED for 4.34 seconds c. On the Arduino i. If answer is 1. Range 0-10: Flash (On/Off) Far Right for 5 seconds 2. Range 10-100: Flash (On/Off) Far Left and Middle for 5 seconds 3. Range 100-1000: Flash (On/Off) Middle and Far Right three times for 5 seconds 4. Range > 1000: Flash (On/Off) ALL LED’s On/Off for 1 sec each 3 times and then Turn one LED at a time for a second each turning it off before the next one comes on. Print on Screen THAT IS A BIG NUMBER!

Submit : Final Program Share/Email URL to [email protected].

In Body of the Email List the Following Last Name_Midterm_Program#: PASTE URL

(I.E Jourden_Midterm_Program3)

Modify to use only 3 LED Lamps