Skip to content
Snippets Groups Projects
Commit 47bb4bc4 authored by BeomSooHeo's avatar BeomSooHeo
Browse files

My First Printf

parent dcf77891
No related branches found
No related tags found
No related merge requests found
*.exe
File deleted
#include <stdio.h> #include <stdio.h>
<<<<<<< HEAD
int main(void) {
int a;
fscanf(stdin, "%d", &a);
if ( a > 0)
fprintf(stderr, "Error: It is positive\n");
else fprintf(stderr, "Error: It is negative\n");
fprintf(stdout,"Hello, World %-10d\n", a);
return 0;
=======
int main() { int main() {
int a; int a;
fscanf(stdin, "%d", &a); fscanf(stdin, "%d", &a);
if(a > 0) if(a > 0)
fprintf(stderr, "Error: It is positive\n"); fprintf(stderr, "Error: It is positive\n");
else fprintf(stderr, "Error : It is negative\n"); else fprintf(stderr, "Error : It is negative\n");
fprintf(stdout, "Hello, World %-10d\n", a); fprintf(stdout, "Hello, World %-10d\n", a);
>>>>>>> 3096cf968b71860d98f342ab362718d479e16eca
} }
File deleted
-200
Error : It is negative
Error: It is positive
Hello, World 200
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment