CPS 196 class notes

CPS 196 class notes - CPS 196 class notes 12:28 Dr. Tan...

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

View Full Document Right Arrow Icon
CPS 196 class notes 12:28 Dr. Tan Email: tkosiyat@syr.edu Subject: CPS196…. Office Hours: TBA Office: 4-294 CST August 31, no lab Input / Output First thing we see in every application # include <stdio.h. int main (void) { print(“Welcome to CPS196 \n”); print (“Have a nice day \n”); return 0; } Include <stdio> Stdio= standard input/output Tell computer to incorporate the standard input/output package Functions - Show output on screen - receive input from keyboard Type_of_Function - int Funtion’s_name - main (paraneters) - void Int - Integer (number -/+) no decimals - Main - starting point of whole program, - special function in 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
Write a procedure to fix your car Include a mechanic #include <mechanic> int main (void) { changeoil (oil, oil filter); return 0; <mechanic> diagnor, change oil, fix break etc. Write a procedure to dye your hair #include <hairdresser> int main (void) { shampoo (shampoo, conditioner) dyehair (hair color); } Continued in notebook
Background image of page 2
12:28 READ Cht 1-4 MOST IMPORTANT OUTPUT ____________________________________________________________ #include <stdio.h> int main (void) { printf (“…. .”); return 0; } ____________________________________________________________ \n go to next line line feed _________________________________________________________ #include <stdio.h> int main (void) { printf(“*********\n”);
Background image of page 3

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

View Full DocumentRight Arrow Icon
12:28 printf(“* CPS *\n”); printf(“*********\n”); } _____________________________________________________________ COMMENT remind yourself what you have done to help others understand your code required on hw 1. /* marks beginning of the comment 2. */ marks the end of the comment
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 19

CPS 196 class notes - CPS 196 class notes 12:28 Dr. Tan...

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

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