nogood.c 304 Bytes
Newer Older
Alan Marchiori's avatar
Alan Marchiori committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

/* nogood.c -- a program with errors
 * Stephen Prata - C Primer Plus
 */
#include <stdio.h>
int main(void)
(
		int n, int n2, int n3;

/* this program has several errors
 	 	 n = 5;
 	 	 n2 = n * n;
 	 	 n3 = n2 * n2;

 	 	 printf("n = %d, n squared = %d, n cubed = %d\n", n, n2, n3)

 	 	 return 0;
)