Principles of Computer Programming

From David Vernon's Wiki
Revision as of 10:26, 27 January 2017 by Dvernon (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Here are some code segments for the examples in the course on principles of computer programming.

/* Example 1                                       */
/* This is a C program to ask you to type a letter */
/* and then to tell you what you typed             */
#include <stdio.h>
main() { 
   char letter;
   printf(“Please type a letter & then press Return >>”);
   scanf(“%c”,&letter);
   printf(“You typed the letter %c”, letter);

}