Initial commit of lecture code
This commit is contained in:
14
LC5/printf_example.c
Normal file
14
LC5/printf_example.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
int main(void)
|
||||
{
|
||||
int a,b,c,sum; /* Define variables */
|
||||
a = 1; /* Assign values */
|
||||
b = 2;
|
||||
c = 3;
|
||||
sum = a + b + c ; /* Calculate sum & Display */
|
||||
|
||||
printf ("\nThe sum of %d + %d + %d is %d \n", a, b, c, sum);
|
||||
|
||||
return 0; /* Return from prog */
|
||||
}
|
BIN
LC5/printf_example.exe
Normal file
BIN
LC5/printf_example.exe
Normal file
Binary file not shown.
Reference in New Issue
Block a user