Need the solutions for the following problem from Starting out with C++: From Control Structures Through Objects - 8th edition
CH.11 Page 651 Programing challenges #12
Please send the solution codes to [email protected] if you can.
#include <iostream>
using namespace std;
const int columns = 4;
struct StuDent //user defined datatype
{
int id[6];
char names[6][20];
int scores[6][4];
double avg[6];
char grade[6];
}; //semi-colon required
//pass by reference
void calculateAverage(StuDent&);
char letterGrade(StuDent&);
int main()
{
const int rows = 6;
//declare and allocate
StuDent r;
//enter student id
cout<<"Student id: ";
for(int i=0; i<6 ;i++)
cin>>r.id[i];
//enter student+scores
for(int i=0; i<6 ;i++)
{
cout<<"Enter Name of student "<<i+1<<": ";
cin>>r.names[i];
cout<<endl;
}
for(int i=0; i<rows; i++)
{
cout<<"Enter "<<columns<<" scores for student "<<i+1<<": ";
for (int j=0; j<columns; j++)
{
cin>>r.scores[i][j];
}
cout<<endl;
}
//display
cout<<"Student id: "<<r.id<<endl;
cout<<"Scores: ";
for(int i=0; i<4 ; i++)
cout<<r.scores<<" ";
cout<<endl;
//compAvg
calculateAverage(r);
cout<<"Avg Score: "<<r.avg<<endl;
letterGrade(r);
cout<<"Letter Grade: "<<r.grade<<endl;
}//endmain
void avg(StuDent& r)
{
int sum=0;
for(int i=0; i<6 ; i++)
sum+=r.scores[columns][i];
r.avg=static_cast<double>(sum)/4;
//error: incompatible types in
//assignment of 'double' to 'double [6]'
//
}
char grade(StuDent& r)
{
int sum = 0;
char grade;
for(int j=0; j<6; j++)
{
sum += r.scores[columns][j];
}
double avg = sum/4;
cout<<"Avg: "<<avg;
if(avg >= 90)
grade = 'A';
if(avg >= 80 && avg < 90)
grade = 'B';
if(avg >= 70 && avg < 80)
grade = 'C';
if(avg >= 60 && avg < 70)
grade = 'D';
if(avg < 60)
grade = 'F';
return grade;
}
Need the solutions for the following problem from Starting out with C++: From Control Structures Through...
Will someone please post the solution to Starting out with C++ from control structures through objects 8th edition chapter 7 programming challenge # 16.
Starting out with C++ From Control Structures through Objects 8th Edition Chapter 7 Programming Challenges Number 5
Starting Out with C++ From Control Structures through Objects, Tony Gaddis, 9th edition, ISBN 978- 0134498379. Number guessing game Seed the random numbers. Have the computer randomly select a number between 1 and 10. Loop: Ask the user for a number between 1 and 10. Validate the user's entry. If invalid, repeat the loop. Compare the user's guess to the computer's and show the results: too low, too high, or matching
Chapter 14 starting out with c++ from control structures through objects Feet Inches Modification Modify the FeetInches class discussed in this chapter so it overloads the following operators: <= >= != Demonstrate the class's capabilities in a simple program.
Number 16. Chapter 3 Problem Comes from "Starting out with >>> C++ From Control Structures through Objects" Ninth Edition. Checking work Programming Challenges 147 16. Senior Citizen Property Tax Madison County provides a $5,000 homeowner exemption for its senior citizens. For example, if a senior's house is valued at $158,000, its assessed value would be $94,800, as explained above. However, he would only pay tax on $89,800. At last year's tax rate of $2.64 for cach $100 of assessed value,...
Starting out with Java: From control structures through objects, 1e Complete the programming challenge Chapter 13 #4 Make sure that you CREATE A MENU SYSTEM. The menu should have sub-menus for plans, phones, options, and a file menu that allows the user to exit the GUI. The total cost of the plan should be displayed and updated as the user makes menu choices.
Starting out with C++ Early Objects solution 8th edition, chapter 8 programming challenge 11... line case 2:cc.properWords(s) is giving me a build error... build error states "properWords" is not a char converter. How do I fix this?
This is a beginner's C++ class. Please use basic C++ knowledge or approaches provided in the first 10 chapters of "starting out with >>>C++ From Control Structures through Objects 9th Edition". I will leave a thumbs up rate if the code works and done quickly. Thank you. Write a program that uses two identical arrays of at least 20 integers. It should call a function that uses the bubble sort algorithm to sort one of the arrays in ascending order....
For this project we need to determine the out of control points from the rules in Chapter 11. Determine which data points are out of control for three cases. 1. Evaluate the Low control by itself. 2. Evaluate the High control by itself. 3. Evaluate the High and low control chart together. Give the rule that states why. Use the charts below. To be able to do this you need to calculate the mean, median, and standard deviation for Control...
I need help with this programming challenge from Starting out with C++ 6th ed. by Gaddis. I am looking for help with Chapter 19 programming challenge 11.