There are 28 boys and 22 girls in class write programme in QBASIC to percentage of boys and girls
Answers
Answered by
0
No of boys= 28
No of girls= 22
Percentage = no of boys/ no of girls
= 28/22
= 14/11
= 1.27272727 ans
No of girls= 22
Percentage = no of boys/ no of girls
= 28/22
= 14/11
= 1.27272727 ans
Answered by
1
#include <iostream>
using namespace std;
int main(){
int girls=22,boys=28;
int total = boys + girls;
double boys_percentage = double(boys)/total)*100;
double girls_percentage = double(girls)/total)*100;
cout << "Girls Percentage :"<<girls_percentage<<endl;
cout << " Boys Percentage :"<<boys_percentage<<endl;
return 0;
}
using namespace std;
int main(){
int girls=22,boys=28;
int total = boys + girls;
double boys_percentage = double(boys)/total)*100;
double girls_percentage = double(girls)/total)*100;
cout << "Girls Percentage :"<<girls_percentage<<endl;
cout << " Boys Percentage :"<<boys_percentage<<endl;
return 0;
}
Similar questions