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

The __________ attribute is used to announce variables based on definitions of columns in a table?

1203


Are the outer parentheses in return statements really optional?

1113


Why does this code crash?

1091


Explain what is dynamic data structure?

1162


how to build a exercise findig min number of e heap with list imlemented?

2075


What is the best organizational structure?

1119


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

1087


What is the function of this pointer?

1331


a value that does not change during program execution a) variabe b) argument c) parameter d) none

1236


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

2121


What is a pointer and how it is initialized?

1154


How important is structure in life?

1082


Is fortran still used in 2018?

1038


How can I change the size of the dynamically allocated array?

1149


What are actual arguments?

1083