Commit a61ade76 authored by Alan Marchiori's avatar Alan Marchiori
Browse files

lec02 post class commit

parent 7817b51f
/* nogood.c -- a program with errors
* Stephen Prata - C Primer Plus - Listing 2.4
*/
#include <stdio.h>
int main(void)
(
int n, int n2, int n3;
{
int n;
int n2;
int n3;
/* this program has several errors
/* this program has several errors */
n = 5;
n2 = n * n;
n3 = n2 * n2;
n3 = n2 * n;
printf("n = %d, n squared = %d, n cubed = %d\n", n, n2, n3)
printf("n = %d, n squared = %d, n cubed = %d\n", n, n2, n3);
return 0;
)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment