True! Gamit ko nga sa phone lang e.Meron namang app sa android na pwedeng compiler. Di naman kelangan ng pc palage hehe
#include <iostream>
using namespace std;
int main()
{
int total = 0;
cout << "Enter 5 subject grade" << endl;
for(int a = 1, score; a <= 5; a++)
{
cin >> score;
total += score;
}
cout << total << " Total Score" << endl;
cout << (total / 5) << " Average Score" << endl;
if((total / 5) >= 75)
cout << "PASADO!";
else
cout << "PASMADO!";
return 0;
}
#include <iostream>
#include <string>
using namespace std;
main(){
double totalGrade, grade;
int period = 1;
string currentPeriod;
do{
switch(period){
case 1:
currentPeriod = "Prelim";
break;
case 2:
currentPeriod = "Midterm";
break;
case 3:
currentPeriod = "Semi-Finals";
break;
case 4:
currentPeriod = "Finals";
break;
default:
currentPeriod = "";
break;
}
cout << "Enter 5 Subject Grade in " << currentPeriod << endl;
for (int i = 0; i<5; i++){
cin >> grade;
totalGrade = totalGrade + grade;
}
cout << totalGrade << " Total in " << currentPeriod << endl;
cout << (totalGrade/5) << " Average in " << currentPeriod << endl;
cout << (totalGrade/5) << " Percentage in " << currentPeriod << endl;
if(totalGrade > 75){
cout << "You PASSED in " << currentPeriod << endl;
}
else {
cout << "You FAILED in " << currentPeriod << endl;
}
totalGrade = 0;
period++;
}while(period < 5);
}
Ano pangalan nang app ts?True! Gamit ko nga sa phone lang e.
Maraming salamat ts try koTry nyo po to
Code:#include <iostream> #include <string> using namespace std; main(){ double totalGrade, grade; int period = 1; string currentPeriod; do{ switch(period){ case 1: currentPeriod = "Prelim"; break; case 2: currentPeriod = "Midterm"; break; case 3: currentPeriod = "Semi-Finals"; break; case 4: currentPeriod = "Finals"; break; default: currentPeriod = ""; break; } cout << "Enter 5 Subject Grade in " << currentPeriod << endl; for (int i = 0; i<5; i++){ cin >> grade; totalGrade = totalGrade + grade; } cout << totalGrade << " Total in " << currentPeriod << endl; cout << (totalGrade/5) << " Average in " << currentPeriod << endl; cout << (totalGrade/5) << " Percentage in " << currentPeriod << endl; if(totalGrade > 75){ cout << "You PASSED in " << currentPeriod << endl; } else { cout << "You FAILED in " << currentPeriod << endl; } totalGrade = 0; period++; }while(period < 5); }
Welcome po. Kung meron po kayong tanong or di maintindihan sabihin nyo lang poMaraming salamat ts try ko
CppdroidAno pangalan nang app ts?
Welcome po. Kung meron po kayong tanong or di maintindihan sabihin nyo lang po
Cppdroid