answersLogoWhite

0

#include#includevoid main()int n;printf("enter any number");scanf("%d",&n);while(n%2==0)printf("enter the number is even");elseprintf("enter the number is odd");}getch()
User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Write a program using while loop?

//program to find the factorial value f any number using while loop #include<stdio.h> void main() { int i,n,fact=1; printf("Enter the number\n"); scanf("%d",&n); i=n; while (i>=1) { fact=fact*i; i--; } printf("The factorial value=%d",fact); } the above is a program for calculating tha factorial value of any number which is entered by the user


How do you write a c program to print n no's required using while loop?

int i=0; while (i++<n) { /*...*/ }


How can we print a book using google print?

"While it is possible to use this program to print a book, it is highly recommended to print it with an actual publisher. You will get a much better deal and your book will look a lot more professional."


Write a c program to print the 100 to 1 nos?

Write a c program to print the 100 to 1 nos


How do you print the numbers 1 through 50 using a do-loop while statement in Visual Basic.NET?

x as int = 0 while x < 50 x = x + 1 print x endwhile


C program to print numbers 1 to n?

how do we use loops in c plus plus programing and what are basic differences between do,for and while loop


Write a c or c plus plus program to print first 50 odd numbers using do while loop?

unsigned count = 0;unsigned num=1; do { std::cout << num << std::endl; num +=2; } while (++count<50);


A program prints vertically a numbers in c program?

It is too easy................ //Program to print numbers vertically #include<stdio.h> #include<conio.h> void main() { int last_no; int i; clrscr(); i=0; printf("Enter your last num.I will print 0 to that number"); scanf("%d",&last_no); printf("\n"); while(i>last_no) { printf("%d\n",i); i++; } getch(); } //poo.papule


Write a program in c plus plus to print all odd numbers between 1 to 100?

#include <iostream> using namespace std; int main() { int i=1; do { if( i%2 ) cout<<i<<" "; } while( ++i<100 ); cout<<endl<<endl; return(0); }


WAP To print the squares of all even numbers from 1 to 20?

CLS PRINT "PROGRAM: Print squares of all even numbers from 1 to 20" PRINT PRINT "number", "squared" PRINT FOR number% = 1 TO 20 IF number% MOD 2 = 0 THEN PRINT number%, number% * number% END IF NEXT END


Is it possible to make a program using for and not with while?

The following cases are all possible:- program without any for and while- program without for- program without while- program with both for and while


Can someone make you a while statement program that will calculate the squares of all the numbers from 10 to 50?

10 N = 1020 WHILE N < 5130 S = N^2 : Print N, S40 N = N + 150 WEND