COP 3223H meeting -*- Outline -*- * Friday Problems ** installation ------------------------------------------ FOR YOU TO DO Install Code::Blocks on your machine See http://www.cs.ucf.edu/~leavens/COP3223H/running_c.shtml 1. http://www.mingw.org/ 2. http://www.codeblocks.org/ ------------------------------------------ ** I/O in C ------------------------------------------ FOR YOU TO DO Make a console application in C that prompts for a name (on stdout) and reads a name from stdin and prints: Hello, NAME! on stdout, where NAME is replaced by the name input. For example: name? Gary Hello, Gary! name? Veronica Hello, Veronica Do this by putting the following lines in order (and indenting them): #include return EXIT_SUCCESS } #include { scanf("%50s", name); char name[BUFSIZE]; printf("Hello, %s\n", name) printf("name? "); #define BUFSIZE 51 ------------------------------------------ ** variables in C ------------------------------------------ FOR YOU TO DO Write a C program that reads two numbers from stdin and prints their sum on stdout. Do this by arranging the following lines in order with proper indentation. printf("The sum is %d\n", x+y); #define BUFSIZE 51 #include int x; int readint() { scanf("%d", &i); int y; } y = readint(); printf("integer? "); #include return EXIT_SUCCESS; x = readint(); return i; int i; } int main() { ------------------------------------------