Top Banner

Click here to load reader

of 55

G+ Summer C Study 20130705(2일차)

Nov 16, 2014

Download

Documents

Jake Yoon

2일차 20130705

다룬 내용은
변수(바구니)와 조건문(if문) 입니다.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 1. G+ Summer C Programming Study 1 2013. 07. 05 19:00 G-Lab

2. 2 3. 3 C ? 4. 4 C C? 5. 5 C ? 6. 6 #include int main(void) { printf(Hello, World); return 0; } 7. 7 printf([%d], 5 ); Quiz1 : [5] 8. 8 printf([%5d], 5 ); Quiz2 : [ 5] 9. 9 printf([%-5d], 5 ); Quiz3 : [5 ] 10. 10 printf([%+d], 5 ); Quiz4 : [+5] 11. 11 printf([%.5f], 10/3.0f ); Quiz5 : [3.33333] 12. 12 printf([%*d], 6, 6 ); Quiz6 : [ 6] 13. 13 TODO ? if? else? 14. 14 ! C ;() ! 15. 15 ? 16. 16 ? 17. 17 char int(long int) float(double) 18. 18 ? 19. 19 ? ?! 20. 20 int a Quiz1 , . : ! c ! 21. 21 int 3ab; : ! ! Quiz2 , . 22. 22 char cha; : cha ! Quiz3 , . 23. 23 double float; : ! float Quiz4 , . 24. 24 float kk; : kk ! Quiz5 , . 25. 25 int a; : a ! Quiz6 , . 26. 26 int 4th; Quiz7 , . : ! ! 27. 27 int x; : ! ! Quiz8 , . 28. 28 char tax-rate; : ! ! Quiz9 , . 29. 29 double id@addr; : ! @ ! Quiz10 , . 30. 30 10 ~~~ 31. 31 if ? 32. 32 C ? 33. 33 . if . 34. 34 , if ? 35. 35 , . . 36. 36 ? ! 37. 37 a == 5; Example1 38. 38 a =< 5; Example2 39. 39 a 5; Example4 41. 41 a != 5; Example5 42. 42 a >= 5; Example6 43. 43 a 5 . Example7 . 44. 44 a 5 . Example8 . 45. 45 a 5 . Example9 . 46. 46 a 5 . Example10 . 47. 47 a 5 . Example11 . 48. 48 a b . Example12 . 49. 49 , if ! ( !! ) 50. 50 if (my_money >= 8000) { eat chick! chick!; } else { i dont have money T.T; } Example13 51. 51 if (tall >= 186) { wow!; } else if (tall >= 176) { thats O.K; } else { So..So..T.T; } Example14 52. 52 if (time >= 9) { time over!!!; } else { just study!!; } Example15 53. 53 if (passion == 100) { Jake Yoon?!; } else { you should make passion; } Example16 54. 54 if (score >= 97) { printf(A+); } else if (score >= 93) { printf(A); } else if (score >= 90) { printf(A-); } else { printf(F); } Example17 55. 55 . 7 8() GDG .