Question: There are bugs in these 3 programs, find the errors in each and tell me how you fixed them. Send a fixed program of each

There are bugs in these 3 programs, find the errors in each and tell me how you fixed them.

Send a fixed program of each in the end. Thanks:)

1st code:

#include  int main() { cout < "!!!Hello World!!!" < endl; // prints !!!Hello World!!! return 0; }

2nd code:

#include  using namespace std; int main() { string age; cout << "Please enter your name: "; cin >> userName; cout << "Hello " << userName << ", how are you?" << endl; cout << "Please enter your age: "; cin >> age; cout << "Here is your age doubled: " << age*2 << endl; return 0; } 

3rd code:

#include  using namespace std; int main() { int largeInteger = 34389340934938; int result; int choice; string resultString = ""; cout << "The value of largeInteger is: " << largeInteger << endl; cout << "Please choose from one of the following options and enter your choice (1, 2, or 3). "; cout << "1: divide largeInteger by 2. "; cout << "2: divide largeInteger by 3. "; cout << "3: mod the largeInteger by 9. "; cout << "Enter choice: "; cin >> choice; switch(choice){ case 1: result = largeInteger/2; resultString = "Your result after dividing by 2: "; case 2: result = largeInteger/3; resultString = "Your result after dividing by 3: "; case 3: result = largeInteger%9; resultString = "Your result after moding by 9: "; } cout << resultString << result << endl; return 0; } 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!