unit 04 version B ohah4u

unit 04 version B ohah4u - {...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 Unit 04 Readiness Test version B 1) A) if (grade <= 59) { if (grade >=50) { second = second +1 } } B) if (number > 100) { } else if (number < 0) { } else sum = sum + number C) if (M1 > 60) { if (M2 > 60) { } } else if (T> 200) { } else 2) #include <stdio.h> #include <stdlib.h> int main() printf(hOut of rangeh) printf(hOut of rangeh) printf(h Admitted \nh) printf(h Admitted \nh) printf(h Not admitted\nh)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Sheet1 Page 2 { int n,x,y,z printf("How many fibonacci numbers to print out: ") if (n == 1)
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { printf(&quot;1&quot;) getchar() getchar() return 0 } if (n == 2) { printf(&quot;1 1&quot;) getchar() getchar() return 0 } printf(&quot;1 1&quot;) x = 1 y = 1 do { z = x + y printf(&quot; %d&quot;,z) x = y y = z n--} while (n&gt;2) getchar() getchar() return 0 } 3) #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int i,j,x j = 1 for (i=1 i&lt;=5 i++) { for( j&lt;=i j++) { for (x = j x &gt; 0 x--) { printf(&quot;%d&quot;,j) Sheet1 Page 3 } } printf(&quot;\n&quot;) } getch() return 0 }...
View Full Document

Page1 / 3

unit 04 version B ohah4u - {...

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

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