unit 04 version B ohah4u

unit 04 version B ohah4u - printf"1" getchar...

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("1") getchar() getchar() return 0 } if (n == 2) { printf("1 1") getchar() getchar() return 0 } printf("1 1") x = 1 y = 1 do { z = x + y printf(" %d",z) x = y y = z n--} while (n>2) getchar() getchar() return 0 } 3) #include<stdio.h> #include<conio.h> void main() { int i,j,x j = 1 for (i=1 i<=5 i++) { for( j<=i j++) { for (x = j x > 0 x--) { printf("%d",j) Sheet1 Page 3 } } printf("\n") } getch() return 0 }...
View Full Document

This note was uploaded on 09/11/2008 for the course ME 205 taught by Professor Koen during the Spring '07 term at University of Texas.

Page1 / 3

unit 04 version B ohah4u - printf"1" getchar...

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