lesson 7 twonbrs c
[[lesson_7_twonbrs_c]] last edit on Aug 10, 2005 3:17 AM by rescued_by_c

[user02@FC4 Lesson07]$ cat -n twonbrs.c
   1  #include <stdio.h>
   2
   3  int main(void)
   4  {
   5     int first, second;  // Numbers typed at the keyboard
   6
   7     printf("Type two numbers and press Enter: ");
   8     scanf("%d %d", &first, &second);
   9     printf("The numbers typed were %d and %d\n", first, second);
  10
  11     return 0;
  12  }
[user02@FC4 Lesson07]$ gcc -o twonbrs twonbrs.c
[user02@FC4 Lesson07]$ ./twonbrs
Type two numbers and press Enter: 12 67 89
The numbers typed were 12 and 67