Problem
Write a program that gets input of total number of students in a class and then asks for the fee collected per student. It displays total fee collected from the class.Note: Problem forwarded to us by "Ali Aftab".
Solution
Here is the code that solves the above given problem.#include <iostream>
#include <conio>
void main(){
clrscr();
float fee;
int nos;
double t_fee;
cout<<"Enter Number of Students = ";
cin>>nos;
cout<<"Enter Fee collected from Students = ";
cin>>fee;
t_fee = fee * nos;
cout<<endl<<"Total Fee Collected is = "<<t_fee<<endl;
getch();
}
No comments:
Post a Comment