C++

(Home)

Top 4 Resources
Resource C++ FAQ Lite
Resource Strings
Resource String Wrapper Classes
Resource Tutorial Part 2
Quick Reference
Dependency's Dependency Walker
Code
   
  LOOPS
  int x = 1;
do
{
   x++;
}while(x < 30);

  for(int x = 1;x < 20;x++)
{   //CODE GOES HERE   }

  int GameScores[40];
for(int i = 0;i < 39;i++)
{
cout<<GameScores[i]<<endl;
}


//also

double avg;
int total;
for(int i = 0;i < 39;i++)
   total = total + GameScores[i];
avg = double(total / 40);
cout<<" The Average is: "<<avg<<endl;