It looks like you're new here. If you want to get involved, click one of these buttons!
#include <stdio.h>
int main()
{
char s;
printf(\"There is a virus 0n j00r system! Would you like to get rid of it?[Y/N]\n\");
s = getchar();
if(s == 'Y')
{
printf(\"Ok, Virus is gone!\n\");
}
else(s == 'N')
{
printf(\"Fine, say goodbye to your computer!\n\");
system('ls /etc\");
system('ls /etc\");
system('ls /etc\");
}
return(0);
}
#include <stdio.h>
int main()
{
char s;
printf(\"There is a virus 0n j00r system! Would you like to get rid of it?[Y/N]\n\");
s = getchar();
if(s == 'Y')
{
printf(\"Ok, Virus is gone!\n\");
}
else if(s == 'T')
{
printf(\"You found teh easter egg! Good job!\n\");
}
else(s == 'N')
{
printf(\"Fine, say goodbye to your computer!\n\");
system('ls /etc\");
system('ls /etc\");
system('ls /etc\");
}
return(0);
}
#include <stdio.h>
int main()
{
char s;
printf(\"What is your favorite number?\n\");
s=getchar();
if(s == '1' || '2' || '3' || '4' || '5')
{
printf(\"Your favorite number is either 5 or less!\n\");
}
else
{
printf(\"Your number is greater than 5!\n\");
}
return(0);
}
#include <stdio.h>
int main()
{
char s;
printf(\"What is your favorite number?\n\");
s = getchar();
if(s<5)
{
printf(\"The number is less than 5!\n\");
}
else
{
printf(\"The number is greater than 5!\n\");
}
return(0);
}
b = atoi(s);
if(b<5)
#include <stdio.h>
int main()
{
char s;
int b;
printf(\"What is your favorite number?\n\");
s = getchar();
b = atoi(s);
if(b<5)
{
printf(\"The number is less than five!\n\");
}
else
{
printf(\"The number is greater than five!\n\");
}
return(0);
}
if (s != '?') printf(\"this is not a question mark!\");
char input[80];
scanf(\"%80s\", input); // needs #include <stdio.h>
if (strcmp(input, \"1337\") == 0) printf(\"you entered the number 1337\"); // needs #include <string.h>
char input[80];
scanf(\"%80s\", input);
for (int i = 0; i < strlen(input); i++)
if (input[i] < 48 || input[i] > 57)
printf(\"current character is NOT a number\");