diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b883f1fdc6d69146f477bba77c117fbbd33714af --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.exe diff --git a/hello b/hello deleted file mode 100755 index 51b0de3c22e9de0327dbc2138d96869863a5ec3f..0000000000000000000000000000000000000000 Binary files a/hello and /dev/null differ diff --git a/hello.c b/hello.c index 18814029708e194f0ba594378b126d1061fc10dd..789d26578959278bb3b14b9d0c0f765b96ec229f 100644 --- a/hello.c +++ b/hello.c @@ -1,31 +1,16 @@ #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 a; + int a; -fscanf(stdin, "%d", &a); -if( a > 0) - fprintf(stderr, "Error: It is positive\n"); + fscanf(stdin, "%d", &a); -else fprintf(stderr, "Error: It is negative\n"); + 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); -fprintf(stdout, "Hello, World %-10d\n", a); ->>>>>>> 3096cf968b71860d98f342ab362718d479e16eca } diff --git a/hello.exe b/hello.exe deleted file mode 100644 index 51da4ea2c41c32102b986641d6368aaeec4fa69e..0000000000000000000000000000000000000000 Binary files a/hello.exe and /dev/null differ diff --git a/input_data b/input_data new file mode 100644 index 0000000000000000000000000000000000000000..25f412a3e1fbddcd4014c99026247350089b6b7b --- /dev/null +++ b/input_data @@ -0,0 +1 @@ +-200 diff --git a/output_data b/output_data new file mode 100644 index 0000000000000000000000000000000000000000..31cf45e3eef0f0ef92326fd15c33934ef01f58d6 --- /dev/null +++ b/output_data @@ -0,0 +1 @@ +Error : It is negative diff --git a/stderr.txt b/stderr.txt new file mode 100644 index 0000000000000000000000000000000000000000..dfc6e88be05f185995364d6f765486c1a7f983d6 --- /dev/null +++ b/stderr.txt @@ -0,0 +1 @@ +Error: It is positive diff --git a/stdout.txt b/stdout.txt new file mode 100644 index 0000000000000000000000000000000000000000..93a2819d42968e78d2d4a1f87d18e7860e3001b8 --- /dev/null +++ b/stdout.txt @@ -0,0 +1 @@ +Hello, World 200