JavaScript
The JavaScript language Here we learn JavaScript, starting from scratch and go on to advanced concepts like OOP. We concentrate on the language itself here, with the minimum of environment-specific notes
#include <stdio.h>
int main()
{
int n;
printf("Input an integer\n");
scanf("%d", &n);
n%2 == 0 ? printf("Even\n") : printf("Odd\n");
return 0;
}
#include <stdio.h>
int main()
{
int n;
printf("Enter an integer\n");
scanf("%d", &n);
if (n%2 == 0)
printf("Even\n");
else
printf("Odd\n");
return 0;
}
#include <stdio.h>
int main()
{
int n;
printf("Enter an integer\n");
scanf("%d", &n);
if (n & 1 == 1)
printf("Odd\n");
else
printf("Even\n");
return 0;
}
#include <stdio.h>
int main()
{
int n;
printf("Enter an integer\n");
scanf("%d", &n);
if ((n/2)*2 == n)
printf("Even\n");
else
printf("Odd\n");
return 0;
}
Comments
Post a Comment