#include
#include
void main()
{
int n;
clrscr();
printf("\nEnter the year:");
scanf("%d",&n);
if((n%400==0)((n%4==0)&&(n%100!=0)))
printf("Leap Year");
else
printf("Not a Leap Year");
getch();
}
output:
Enter the year:2003
Not a Leap Year
Enter the year:1312
Leap Year
Enter the year:1300
Not a Leap Year
Enter the year:1600
Leap Year
8086 assembly language program to check wether given number is perfect or not
write a program in C to check whether a given number is apalindrome or not
45
#include<stdio.h> #include<conio.h> void main() { int n; printf("ENTER NO FOR CHECK........ "); scanf("%d", &n); if(n%2==0) printf("Given No is EVEN"); else printf("Given No is ODD"); getch(); }
simple program
consider a/b * c/d check whether a/b and c/d are in simplest form. if not make them.. if they are then check whether a/d and c/b are in simple form. if no make them. if they are then the answer is going to be a simple fraction. example 3/8 * 12/5 the given fractions are already in simple form. now check whether 3/5 and 12/8 are in simple form. 12/ 8 is not in simple form. so canceling the multiple 4 12/8 = 3/2 now all fractions are simple therefore now the multiplication becomes 3/2 * 3/5 = 9/10
Solve simple intress usin fortran
[object Object]
write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html
Simple and easy solution:- http://codepad.org/svhkJpxp
Type your answer here... i think we should first enter 1 number then check it
No, the halting problem is undecidable, meaning there is no algorithm that can determine whether a given program will halt or run forever.