Computer Science, asked by naviii30, 1 year ago

A store has 264 cricket balls.write a c program to find Are there an even or odd number of balls?

Answers

Answered by prathamesh1855
4
/*

* C Program to check a number is odd or even using modulus operator

*/

#include <stdio.h>

#include <conio.h>

 

int main(){

    int number;

    printf("Enter a number \n");

    scanf("%d", &number);

    if(number%2 == 1){

        /* Input number is odd */

        printf("%d is Odd Number\n", number);

    } else {

        /* Input number is even */

        printf("%d is Even Number\n", number);

    }

    getch();

    return 0;

}

Answered by Anonymous
36
ANSWER
...........




/*
* C Program to check a number is odd or even using modulus operator
*/
#include <stdio.h>


#include <conio.h>

int main(){
int number;


printf("Enter a number \n");


scanf("%d", &number);


if(number%2 == 1){
/* Input number is odd */


printf("%d is Odd Number\n", number);
} else {


/* Input number is even */


printf("%d is Even Number\n", number);
}
getch();
return 0;
}
Similar questions