Lee_assig10 - c--if(d%10==0)...

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&lt;&lt;endl } cout&lt;&lt;&quot; \n&quot; int total=0, score, limit, max=0, min=1000, average, t=0 cout&lt;&lt;&quot; \n&quot; cout&lt;&lt;&quot;How many scores do you want to enter?\n&quot; cin&gt;&gt;limit while (t&lt;limit){ cout&lt;&lt;&quot;Please enter a score. \n&quot; cin&gt;&gt;score total+=score if(score&gt;max) max=score if (score&lt;min) Sheet1 Page 2 min=score t++ } average=total/limit cout&lt;&lt;&quot;The aerage score is &quot;&lt;&lt;average&lt;&lt;&quot;.\n&quot; cout&lt;&lt;&quot;The minimum score is &quot;&lt;&lt;min&lt;&lt;&quot;.\n&quot; cout&lt;&lt;&quot;The maximum score is &quot;&lt;&lt;max&lt;&lt;&quot;.\n&quot; return 0 }...
View Full Document

Page1 / 2

Lee_assig10 - c--if(d%10==0)...

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