Code:
if(num % 2 == 0)
printf("Even\n");
else
printf("Odd\n");
main should return value, Have a look at this main
Code:
int main()
{
---
---
if(num % 2 == 0)
printf("Even\n");
else
printf("Odd\n");
int main()
{
---
---
#include <stdio.h>
#include <string.h>
int main()
{
int ch;
printf("Please enter [Y/N]\n?");
ch = getchar();
if('Y' == toupper(ch))
printf("You eneter \"YES\"");
else
printf("You
#include<stdio.h>
int main()
{
int num;
printf("Enter a decimal number\n?");
scanf("%d",&num);
printf("Hexadeciaml -> %X\n",num);
getchar();
getchar();
return 0;
}
#include<stdio.h>
void clear_buffer(void);
int main()
{
char string[25];
int choice=1;
while(choice)
{
printf("Enter
cout.precision(5); // Sets the precsion to 5
#include <iostream> #include <cstdlib> using namespace std; int _tmain(int argc, _TCHAR* argv[])
Leave a comment: