Three Basic C++ Questions in MS VS. I just need the code! Will Pay
bobsmith56901. Write code that will ask the user to input a 4 digit code say “3456” à Drive the user crazy by insisting they entered a wrong code even if they entered the correct code!! After 3 attempts, display a message telling the user you were messing with them! And they are now logged in.Copy & paste the final code in the answersheet, take a snapshot of the final output.
2. Write code that will print the square roots of the first 25 odd positive integers.For each odd number print the following sentence: The square root of __ is __.
Copy & paste the final code in the answersheet, take a snapshot of the final output.
Try to run the following program at http://cpp.sh/
#include <iostream>
using namespace std;
int main()
{
int hour;
int min;
for (hour = 1; hour <= 11; hour++)
{
for (min = 0; min <= 59; min++)
{
cout << hour << ":" << min << "AM" << endl;
}
}
system("pause");
return 0;
}
1. What is the bug or logic error in the above program?
2. Add the lines to fix it.
3. This is an example of __nested__________ loops.
4. How many times does the outer loop execute?
5. How many times does the inner loop execute?
6. Make the times more accurate by adding lines of code to print seconds.
**If you can include some simple notes on how you solved the questions, that would be great!**
- 9 years ago
- 10
Purchase the answer to view it
- okalfinal.docx
- ACC349 Cost Accounting WEEK 5 ASSIGNMENT 2015 UPDATE
- Kumar sold 700 television sets to one of its largest customers, Nava, in Venezuela. the contract was on CIF terms,Maracaibo....
- Enterprise Architecture Paper
- BUS 308 Final
- Web design
- Can You Help Me??? 5 Star Work ONLY!!!
- HSM 340 Week 2 Quiz
- Network Managment
- Thesis Construction
- You are the compliance officer of a large multispecialty health care organization located in the Southeastern United States. The organization...