Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program for even numbers?

Answer Posted / kamal

* read a number … */

#include <stdio.h>

int main (void) {

int num; /* input number */

int rem; /* remainder …*/

/* get number from user */

printf(“Please enter a number: ”);

scanf(“%d”, &num);

/* calculate remainder … */

rem = num % 2;

if (rem == 0) {

printf(“even\n”);

} else {

printf(“odd\n”);

}

/* terminate program */

return 0;

}

Is This Answer Correct ?    4 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

2013


Write a program to know whether the input number is an armstrong number.

1170


Why pointers are used in c?

1070


How do I round numbers?

1054


How do you define structure?

1091


What is "Hungarian Notation"?

1167


Difference between goto, long jmp() and setjmp()?

1234


Explain what is a program flowchart and explain how does it help in writing a program?

1143


Explain the difference between strcpy() and memcpy() function?

1063


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

2340


What does #pragma once mean?

1207


5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.

2159


Explain null pointer.

1193


What are the advantages and disadvantages of a heap?

1258


What are pointers? What are different types of pointers?

1219