Question

Please can someone check that program and compile them (send the picture of the runing window)...

Please can someone check that program and compile them (send the picture of the runing window)

A-squareprogram

#include <iostream>
using namespace std;

void squareProgram()
{
int length;
int area;
int perimeter;

cout << "\n\nWhat is the side length of your square: ";
cin >> length;

area = (length * length);
perimeter = (length * 4);

cout << "\n\nYou have a square with a perimeter of " << perimeter << " units and an area of " << area << " sq. units!\n";
return;
}

B-Insurance program

#include <iostream>

void insuranceProgram()
{
int age;

cout << "\n\nWhat is your age (in years): ";
cin >> age;

if ( age < 35 )
{
cout << "\n\n Your quoted insurance rate is 2.23 per hundred.\n";
} else {
cout << "\n\n Your quoted insurance rate is 4.32 per hundred.\n";
}
return;
}

C -Grades program

#include <iostream>

void gradesProgram()
{
int grade;

cout << "\n\nWhat is your grade: ";
cin >> grade;

if (grade >= 90) {
cout << "\n\nYou earned an A, way to go!\n";
} else if ( grade >= 80 )
{
cout << "\n\nYou earned a B, solid work!\n";
} else if ( grade >= 70 )
{
cout << "\n\nYou earned a C, decent job.\n";
} else if ( grade >= 60 )
{
cout << "\n\nYou earned a D, not your best effort.\n";
} else {
cout << "\n\nYou earned an F, you need to hit the books.\n";
}
return;
}

0 0
Add a comment Improve this question Transcribed image text
Answer #1

It is a build failed in Xcode because you have not defined the main function without that there is no entry point for the function which results in build failure.
HomeworkLibMy Mac HomeworkLib Build HomeworkLib: Failed Today at 10:18 AM #include <iostream» using namespace std; By File By Type HomeworkLib 2 issu

Add a comment
Know the answer?
Add Answer to:
Please can someone check that program and compile them (send the picture of the runing window)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can someone please tell me why the calculation for earnings is not coming through at the...

    Can someone please tell me why the calculation for earnings is not coming through at the end of the program? Thank you. //This program should tell us about streaming services #include <iostream> #include <iomanip> #include <string> using namespace std; int main() {    int choice, streams;    double earnings;    string song;    string artist;    string streamingService;       const int Tidal = 0.01250;    const int Amazon = 0.00402;    const int Apple_Music = 0.00735;    const int...

  • my program wont run on my computer and im not understanding why. please help. #include<iostream> #include<iomanip>...

    my program wont run on my computer and im not understanding why. please help. #include<iostream> #include<iomanip> #include<string> #include "bookdata.h" #include "bookinfo.h" #include "invmenu.h" #include "reports.h" #include "cashier.h" using namespace std; const int ARRAYNUM = 20; BookData bookdata[ARRAYNUM]; int main () { bool userChoice = false; while(userChoice == false) { int userInput = 0; bool trueFalse = false; cout << "\n" << setw(45) << "Serendipity Booksellers\n" << setw(39) << "Main Menu\n\n" << "1.Cashier Module\n" << "2.Inventory Database Module\n" << "3.Report Module\n"...

  • Find two syntax errors in the following program: #include <iostream> using namespace std; int area(int length,...

    Find two syntax errors in the following program: #include <iostream> using namespace std; int area(int length, int width = 0); int main() { int length, width; // for rectangle use both arguments cout << "Enter length and width of a rectangle" << endl; cin >> length >> width; cout << "The area is " << area(length, width) << endl; // for square, only need first argument cout << "Enter side of a square" << endl; cin >> length; cout <<...

  • Today assignment , find the errors in this code and fixed them. Please I need help...

    Today assignment , find the errors in this code and fixed them. Please I need help with find the errors and how ro fixed them. #include <iostream> #include <cstring> #include <iomanip> using namespace std; const int MAX_CHAR = 100; const int MIN_A = 90; const int MIN_B = 80; const int MIN_C = 70; double getAvg(); char determineGrade(double); void printMsg(char grade); int main() { double score; char grade; char msg[MAX_CHAR]; strcpy(msg, "Excellent!"); strcpy(msg, "Good job!"); strcpy(msg, "You've passed!"); strcpy(msg, "Need...

  • C++ Object Oriented assignment Can you please check the program written below if it has appropriately...

    C++ Object Oriented assignment Can you please check the program written below if it has appropriately fulfilled the instructions provided below. Please do the necessary change that this program may need. I am expecting to get a full credit for this assignment so put your effort to correct and help the program have the most efficient algorithm within the scope of the instruction given. INSTRUCTIONS Create a fraction class and add your Name to the name fraction and use this...

  • Find the errors in following program. //This program uses a switch statement to assign a //...

    Find the errors in following program. //This program uses a switch statement to assign a // letter grade (A, B, C, D, or F) to numeric test score. #include <iostream> uisng namespace std; int main() { int testScore; cout<<"Enter your test score and I will tell you\n"; cout<<"the letter grade you earned: "; cin>>testScore; switch (testScore) { case (testScore < 60) cout<<"Your grade is F.\n"; break; case (testScore <70) cout<<"Your grade is D.\n" break; case (testScore <80) cout<<"Your grade is...

  • When running the program at the destructor  an exception is being thrown. Can someone help me out?...

    When running the program at the destructor  an exception is being thrown. Can someone help me out? vararray.h: #ifndef VARARRAY_H_ #define VARARRAY_H_ class varArray { public:    varArray(); // void constructor    int arraySize() const { return size; } // returns the size of the array    int check(double number); // returns index of element containg "number" or -1 if none    void addNumber(double); // adds number to the array    void removeNumber(double); // deletes the number from the array   ...

  • Write the missing statements for the following program. #include <iostream> using namespace std; int main(void) {...

    Write the missing statements for the following program. #include <iostream> using namespace std; int main(void) { int Num1; cout << "Enter 2 numbers: ";    cin >> Num2; if (Num1 < Num2) cout << "Smallest number is " << Num1; else cout << "Smallest number is " << Num2;    return 0; }

  • In the code (C++) below, if you input 2 as length and 4 as width, the...

    In the code (C++) below, if you input 2 as length and 4 as width, the output is: Enter the rectangle's length: 2 Enter the rectangle's width: 4 Length: 2 | Width: 4 | Area: 8 | Perimeter:12 We worked on this code during class, but there were some things that I did not understand. 1) how does compiler read"l" as length, "w" as width, etc.? I thought you had to update it first, like "w=width." 2) i thought you...

  • The program has errors. Identify and make the necessary changes to make the program work. Remember...

    The program has errors. Identify and make the necessary changes to make the program work. Remember to follow the rules of functions and arrays. Here is the expected output Total = 20 Average = 15 Area = 150 Area = 70 Enter a value: 10 Value 1 entered = 10 Enter an integer: 20 Value 2 entered = 20 Enter an integer: 30 Value 3 entered = 30 .................................................................. #include <iostream> using namespace std; void total(int, int, int); double average(int...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT