Lee_assig10 - c-if(d==0 cout<<endl...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 //Cheu Lee Assignmnet 10 #include<iostream> using namespace std int main () { cout<<" The sum of all even numbers between 11 and 111 square is :\n" int j, i, sum i=12 sum=0 while (i<=110){ j=i*i sum=sum+j i=i+2 } cout <<sum<<endl cout<<" \n" cout<<" All the products of 5*a with a from 10 to 52 are:\n" cout<<" \n" int a=10, b=1 while (a<=52){ cout<<a*5<<" " a++ if (b%6==0) cout<<endl b++ } cout<<" \n" cout<<"The squares of all numbers from 1 to 50 in a descending order are: \n" cout<<" \n" int c=50, d=1 c=50 while (c>0){ cout<<c*c<<" "
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: c--if(d%10==0) cout<<endl } cout<<" \n" int total=0, score, limit, max=0, min=1000, average, t=0 cout<<" \n" cout<<"How many scores do you want to enter?\n" cin>>limit while (t<limit){ cout<<"Please enter a score. \n" cin>>score total+=score if(score>max) max=score if (score<min) Sheet1 Page 2 min=score t++ } average=total/limit cout<<"The aerage score is "<<average<<".\n" cout<<"The minimum score is "<<min<<".\n" cout<<"The maximum score is "<<max<<".\n" return 0 }...
View Full Document

This note was uploaded on 05/16/2010 for the course CISCO EST61 taught by Professor Miller during the Spring '10 term at Fresno City College.

Page1 / 2

Lee_assig10 - c-if(d==0 cout<<endl...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online