Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

hellloooaaaa

Name: Anonymous 2011-10-10 15:12

#include<iostream>
using namespace std;



int main( )
 {
   
 int x, sum, counter, sonuc;
 sum = 0;
 counter = 0;
 

 
 cout<<"ortalamasini almak istediginiz 5 numara girin"<<endl;
 cout<<"enter a number"<<endl;
 cin>>x;
 sum = sum + x;
 counter = counter + 1;
 
 
 cout<<"enter another number"<<endl;
 cin>>x;
  sum = sum + x;
 counter = counter + 1;

 cout<<"enter another number"<<endl;
 cin>>x;
  sum = sum + x;
 counter = counter + 1;
  cout<<"enter another number"<<endl;
 cin>>x;
  sum = sum + x;
 counter = counter + 1;
  cout<<"enter another number"<<endl;
 cin>>x;
  sum = sum + x;
 
 counter = counter + 1;
 sonuc = sum/counter;
 
 
 cout<<"sonuc = ";
 cout<<sonuc<<endl;
 
 system("PAUSE");
 
   return 0;
}





teach me how to loop this.yes,i'm a complete retard.

Name: Anonymous 2011-10-10 15:13

forgot to add, trying to get the average of given 5 numbers.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List