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

How can I change their mode to binary?

1123


What are lookup tables in c?

1005


How do I get an accurate error status return from system on ms-dos?

1130


What is memory leak in c?

1129


Explain the use of 'auto' keyword in c programming?

1121


How are Structure passing and returning implemented by the complier?

1171


How pointer is different from array?

1088


Why do we use & in c?

1006


List some of the static data structures in C?

1203


What do you understand by friend-functions? How are they used?

1212


What is the meaning of 2d in c?

1128


What is scanf_s in c?

1125


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

1177


What is return type in c?

1141


Array is an lvalue or not?

1130