Name: Anonymous 2009-10-19 20:47
I'm just starting to learn C and the first exercise made in class was to make a program that prints the sum of two integers.
This program:
I showed it to some of my older classmates and went batshit insane with it saying: DO NOT USE PRINTF AND SCANF, THEY ARE NOT FUCKING SAME and other stuff.
Will someone please input on this matter?
Thank you!
This program:
#include <stdio.h>
#include <stdlib.h>
int main (void) {
int n1,n2;
printf("1st int: ");
scanf("%d",&n1);
printf("2nd int: ");
scanf("%d",&n2);
printf("Sum = %d\n",n1+n2);
return EXIT_SUCCESS;
}I showed it to some of my older classmates and went batshit insane with it saying: DO NOT USE PRINTF AND SCANF, THEY ARE NOT FUCKING SAME and other stuff.
Will someone please input on this matter?
Thank you!