Help me please!!

0 Xhengis Miftari · April 1, 2015
please help me with this program
Write a C++ program for a college’s admissions office. Prompt the user for a student’s numeric high school grade point average (for example, 3.2) and an admission test score from 0 to 100. Print the message “Accept” if the student has any of the following: A grade point average of 3.0 or above and an admission test score of at least 60 A grade point average below 3.0 and an admission test score of at least 80 If the student does not meet either of the qualification criteria, print “Reject”.

Post a Reply

Replies

- page 1
Oldest  Newest  Rating
0 Xhengis Miftari · April 1, 2015
please help me with this program

Write a C++ program for a college?s admissions office. Prompt the user for a student?s numeric high school grade point average (for example, 3.2) and an admission test score from 0 to 100. Print the message ?Accept? if the student has any of the following: A grade point average of 3.0 or above and an admission test score of at least 60 A grade point average below 3.0 and an admission test score of at least 80 If the student does not meet either of the qualification criteria, print ?Reject?.
0 zahidul haque · April 2, 2015
you means that someone should write the complete code for you. Buddy that's not good. Burn your finger and come up with your code. Then ask the question what problem you are facing. Believe me it's going to help you out.

Dono br afraid. You will enjoy. Till then happy coding.
0 Xhengis Miftari · April 2, 2015
the problem is that i am facing the problem since the begining 
0 Dimitrios Pechlivanis · April 2, 2015
Then you can start watching the C++ tutorials , they are pretty detailed and will totally cover your needs for this program.
0 Dol Lod · April 2, 2015
Just built up your code incrementally. Figure out how to read input from stdin and how to print to stdout. 
0 Xhengis Miftari · April 5, 2015
hello!! i have a simple question 
i have an applciation wich i should do a switch case 0 but with typing zero should quit the applciation so i should do
case 0:



???????????
please help me
0 Franz Schmidt · April 5, 2015
If you enter a character you cant do case 0: because 0 as a number so you need to do
case '0':
0 Xhengis Miftari · April 6, 2015
hello!!
now i have done the most ecerxise but i have stuck at these point
the xercise-----Write an application that displays a menu of three items in a restaurant as follows:
1. Cheeseburger 4.99
2. Pepsi 2.00
3. Chips 0.75
Prompt the user to choose an item using the number (1, 2, or 3) that corresponds to the item, or to enter 0 to quit the application. After the user makes the first selection, if the choice is 0, display a bill of $0. Otherwise, display the menu again. The user should respond to this prompt with another item number to order or 0 to quit. If the user types 0, display the cost of the single requested item. If the user types 1, 2, or 3, add the cost of the second item to the first, and then display the menu a third time. If the user types 0 to quit, display the total cost of the two items; otherwise, display the total for all three

My code
#include<iostream>
using namespace std;
int main ()
{
int product, item1, item2, item3;
cout<<"Chose a product: "<<endl;
cout<<"1 for cheseburger"<<endl;
cout<<"2 for pepsi"<<endl;
cout<<"3 for chips"<<endl;
cout<<"0 to quit"<<endl;
cin>>product;
switch(product)
{

case 0:




case 1:
cout<<"The price is 4.99"<<endl;
cout<<"Chose a product: "<<endl;
cout<<"1 for cheseburger"<<endl;
cout<<"2 for pepsi"<<endl;
cout<<"3 for chips"<<endl;
cout<<"0 to quit"<<endl;
break;


case 2:
cout<<"The price is 2.00"<<endl;
cout<<"1 for cheseburger"<<endl;
cout<<"Chose a product: "<<endl;
cout<<"2 for pepsi"<<endl;
cout<<"3 for chips"<<endl;
cout<<"0 to quit"<<endl;
break;


case 3:
cout<<"The price is 0.75"<<endl;
cout<<"Chose a product: "<<endl;
cout<<"1 for cheseburger"<<endl;
cout<<"2 for pepsi"<<endl;
cout<<"3 for chips"<<endl;
cout<<"0 to quit"<<endl;
break;



}


}
0 Xhengis Miftari · April 10, 2015
can anyone help me with this exercise plz i have an exam tomorrow and a similiar exercise like this one will be on the exam .plz help me solve it 
0 Franz Schmidt · April 10, 2015
So here you go:

#include <iostream>
using namespace std;

float add(float num1, float num2){
return num1 + num2;
}
void print_total(int *item, float sum){
cout << endl << endl << "Products bought:" << endl;
for (int n = 0; n < 3; n++){
switch (item[n]){
case 1:
cout << "cheseburger - $4.99" << endl;
break;
case 2:
cout << "pepsi - $2.00" << endl;
break;
case 3:
cout << "chips - $0.75" << endl;
break;
}
}
cout << endl << "total: $" << sum;
}
int main(){
int product;
int item[3];
float sum = 0.0;
bool exit_flag = false;
for (int i = 0; i < 3; i++){
cout << endl <<"Choose your product: " << endl;
cout << "1. cheseburger - $4.99" << endl;
cout << "2. pepsi - $2.00" << endl;
cout << "3. chips - $0.75" << endl;
cout << "0 to quit" << endl;
cout << "subtotal: $" << sum << endl;
cout << "Your choose: ";

cin >> product;
item = product;
switch (product){
case 0:
exit_flag = true;
break;
case 1:
sum = add(sum, 4.99);
break;
case 2:
sum = add(sum, 2.0);
break;
case 3:
sum = add(sum, 0.75);
break;
}
if (exit_flag){
break;
}
}
print_total(item, sum);
return 0;
}

just ask what you don't understand or what you haven't learnd jet and i'll explain it to you.:D


EDIT: Sorry but codetags still don't work properly so here you are: http://textuploader.com/xgkt
  • 1
  • 2

C++

107,326 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator