Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main (){
- int xronia,sum=0,num_anerg650=0,epidoma=0,num_anerg10=0,i=0;;
- string name;
- float mo=0.0;
- do {
- cout<<"Dwse name: ";
- cin>>name;
- cout<<"Dwse xronia: ";
- cin>>xronia;
- if (xronia<10){
- epidoma=xronia*100;
- }
- else{
- epidoma=xronia*130;
- num_anerg650++;
- }
- sum=sum+epidoma;
- if (epidoma>650)
- num_anerg10++;
- i++;
- }while (name!="END");
- mo=sum/i;
- cout<<"Mesos oros:"<<mo<<endl;
- cout<<"Arithmos anergwn me epidoma > 650$:"<<num_anerg650<<endl;
- cout<<"Arithmos anergwn pou doulepsan panw apo 10 xronia:"<<num_anerg10<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement