CodeBeam- Spot it here!
Spot to know coding
Home
Tips and Tricks
Differences
Downloads
programs
Software
New
Monday, 15 October 2012
Program to find odd or even number using C
04:09
No comments
#include<stdio.h>
void main ()
{
int number;
clrscr ();
printf ("Enter the value of number: ");
scanf("%d",&number);
if (number%2==0)
{
printf ("\nNumber is Even");
}
else
{
printf("\nNumber is Odd");
}
getch ();
}
Output:
Email This
BlogThis!
Share to X
Share to Facebook
Share to Pinterest
Newer Post
Older Post
Home
0 comments:
Post a Comment
Subscribe to:
Post Comments (Atom)
Social Profiles
Popular
Tags
Blog Archives
Share !
Program to find Armstrong Number
#include <stdio.h> main() { int number, sum = 0, temp, remainder; printf("Enter a number\n"); scanf(...
How to swap two numbers without using third variable
Program : #include<stdio.h> #include<conio.h> void main() { int a,b; clrscr(); printf("Enter the values of a and b...
Fibonacci series program using c
#include<stdio.h> main() { int n, a = 0, b = 1, next, c; printf("Enter the number of terms\n"); scanf("%...
C Program Snippet Samples-1
void main() { int const * p=5; printf("%d",++(*p)); } Answer: Compiler error: Cannot modify a constant value. Explana...
Difference between C++ and Java
C++ was mainly designed for systems programming and Java was created initially to support network computing. But today java is provi...
Matrix addition and multiplication program
Program: #include<stdio.h> void main() { int ch,i,j,m,n,p,q,k,r1,c1,a[10][10],b[10][10],c[10][10]; clrscr(); printf("****...
C Program snippets-6
1.main() { clrscr(); } clrscr(); Answer : No output/error Explanation: The first clrscr() occurs inside a function. So it becomes...
Difference between C and C++
1.C is Procedure Oriented Programming Language (POP). C++ is Object Oriented Programming Language (OOP). 2.C is mostly used to dev...
Conversion of decimal number to a binary number in C++
#include<iostream.h> #include<math.h> #include<conio.h> #include<stdlib.h> void main() { int dec_num; int ...
How to reduce execution time of c program
Try to do things in approximately the following order. 1) Use the right algorithms. Look into the Big O efficiency of any algorithms you a...
Total Pageviews
Labels
Differences
(4)
Tips and Tricks
(3)
About
Categories
Differences
(4)
Tips and Tricks
(3)
Home
facebook like
Ads 468x60px
Followers
Contributors
Karthick G
Unknown
Blog Archive
▼
2012
(39)
►
November
(4)
▼
October
(8)
Abstract Class Vs Interface
Pascal Triangle in c
Program to find odd or even number using C
Difference between C++ and Java
Difference between C and C++
Conversion of decimal number to a binary number in...
Program to find Armstrong Number
Program to generate and print Armstrong Numbers us...
►
September
(20)
►
August
(7)
Featured Posts
Labels
Differences
(4)
Tips and Tricks
(3)
Blog Archive
▼
2012
(39)
►
November
(4)
▼
October
(8)
Abstract Class Vs Interface
Pascal Triangle in c
Program to find odd or even number using C
Difference between C++ and Java
Difference between C and C++
Conversion of decimal number to a binary number in...
Program to find Armstrong Number
Program to generate and print Armstrong Numbers us...
►
September
(20)
►
August
(7)
Recent Posts
Feedjit Live Blog Stats
Download
Add To My Blog
0 comments:
Post a Comment