I have assignments in Programming C++

1 answer below »
I have assignments in Programming C++
Answered Same DayApr 09, 2021

Answer To: I have assignments in Programming C++

Aditi answered on Apr 17 2021
143 Votes
Solution/Intermediate23.cpp
Solution/Intermediate23.cpp
#include
using namespace std;
int main(){

    int temperatures[7][2];
    cout<<"Enter highest and lowest temperatures:"<
    for(int i=0; i<7; i++){
        cout<<"Day "<<(i+1)<<": ";
        f
or(int j=0; j<2; j++){
            cin>>temperatures[i][j];
        }
    }
    double avgHigh = 0, avgLow = 0;
    for(int i=0; i<7; i++){
        avgHigh += temperatures[i][0];
        avgLow += temperatures[i][1];
    }
    avgHigh /= 7;
    avgLow /= 7;
    cout<<"Average High Temperature: "<    cout<<"Average Low Temperature: "<    return 0;
}
Solution/Introductory11.cpp
Solution/Introductory11.cpp
#include
using namespace std;
int main(){

    double beginningBalance = 0.0;
    double deposits = 0.0;
    double withdrawals = 0.0;
    double balance = 0.0;
    cout<<"Enter beginning balance: ";
    cin>>beginningBalance;
    cout<<"Enter total deposits: ";
    cin>>deposits;
    cout<<"Enter withdrawal: ";
    cin>>withdrawals;

    balance = beginningBalance + deposits - withdrawals;
    cout<<"Balance: $"<
    return 0;
}
Solution/Introductory14.cpp
Solution/Introductory14.cpp
#include
using namespace std;
int main(){

    int small = 0;
    int medium = 0;
    int large = 0;
    int family = 0;
    int totalPizza = 0;
    double perSmall = 0.0;
    double perMedium = 0.0;
    double perLarge = 0.0;
    double perFamily = 0.0;

    cout<<"Enter total small pizza: ";
    cin>>small;
    cout<<" Enter total medium pizza: ";
    cin>>medium;
    cout<<" Enter total large pizza: ";
    cin>>large;
    cout<<"Enter total family pizza: ";
    cin>>family;
    totalPizza = small + medium + large + family;
    perSmall = small/totalPizza * 100;
    perMedium = medium/totalPizza * 100;
    perLarge = large/totalPizza * 100;
    perFamily = family/totalPizza * 100;
    cout<<"Total pizza sold:"<    cout<<"Small pizza percentage: "<    cout<<"Medium pizza percentage: "<    cout<<"Large pizza percentage: "<    cout<<"Family pizza percentage: "<
    return 0;
}
Solution/Lab11-2.cpp
Solution/Lab11-2.cpp
#include
using namespace std;
double getAverage(double times[], int numElements);
double getLowest(double times[], int numElements);
int main(){

    double finishTimes[5] = {0.0};


    double avgTime = 0.0;
    double lowestTime = 0.0;

    for(int x=0; x<5; x+=1){
        cout<<"Time for race "<        cin>>finishTimes[x];
    }   //end for

    avgTime = getAverage(finishTimes, 5);
    lowestTime = getLowest(finishTimes, 5);

    cout<<"Average 5K f...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here