Portfolio Title





 

 

Student Portfolio >> Index >> Coding >> Exercise 12

#include <iostream.h>
           int main()
           { int count = 0, i, cube;
 for ( i=1; i <= 20 ; i++)
 { cube = i * i * i;
 cout <<"\n cube of"<<i<<"="<<cube;
 if (cube>80)
 count = count + 1; /*or count++*/ 
 }
 cout<<"\n number of cubes over 80 ="<< count<<endl;
 }
        


<< Back                                                                                                                                                                                         Forward >>

Coding | Website Scripting | Visual Design | Instructional Design | Website Design | Website Design Tools

 

Copyright 2005 Kerstin Kegel