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
  • Find the errors in the following program. You must use pass by reference. #include <iostream> using...

    Find the errors in the following program. You must use pass by reference. #include <iostream> using namespace std; void area2(int area, int length, int width = 0); int main() { int length, width, area; // for rectangle use two arguments cout << "Enter length and width of a rectangle" << endl; cin >> length >> width; cout << "The area is " << area2(area, length, width) << endl; // for squares use one argument cout << "Enter side of a...

  • 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 the five problems with this program. Do not change the functionality or rewrite the program....

    Find the five problems with this program. Do not change the functionality or rewrite the program. #include <iostream> void multiply(int x = 1, int y); int main() { int length, width, area; cout << "Enter length and width of a rectangle "; cin >> length, width; area = multiply(length, width); cout << "The area is " << area << endl; area2 = multiply(width); cout << "The second area is " << area2 << endl; return 0; } void multiply(int x=...

  • The statement in the following program is in the incorrect order. Rearrange the statements so that...

    The statement in the following program is in the incorrect order. Rearrange the statements so that they prompt the user to input the shape type (rectangle, circle, or cylinder) and the appropriate dimension of the shape. The program then outputs the following information about the shape: For a rectangle, it outputs the area and perimeter, for a circle, it outputs the area and circumference; and for a cylinder, it output the volume and surface area. After rearranging the statements, your...

  • 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 <<...

  • Can someone help me make the output of this code more spaced out? #include<iostream> #include<cstdlib> using...

    Can someone help me make the output of this code more spaced out? #include<iostream> #include<cstdlib> using namespace std; int main() {    int amount=1000,guess,answer,bet,count=0,win=0;    float per;    char ch;    cout<<"Welcome to the high-low betting game.\nYou have $1000 to begin the game.\nValid guesses are numbers between 1 and 100.\n";    do    {        cout<<"Please enter a bet:\n";        cin>>bet;        answer=rand()%100;        for (int i=0;i<6;i++)        {            cout<<"Guess "<<i+1<<":";   ...

  • 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...

  • I've built a C++ program that calculates the user's class average based on three test. Can...

    I've built a C++ program that calculates the user's class average based on three test. Can somebody show me how to get the program to look for invalid input? #include <iostream> #include <string> #include <iomanip> using namespace std; int main() { //variables int score_1; //test 1 input from user int score_2; //test 2 input from user int score_3; //test 3 input from user int highest; // the higher score of test 1 & 2 int course_average; //average for class //Introduce...

  • 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...

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