Program for printing the last digit of an integer in words

Program for printing the last digit of an integer in words

#include<stdio.h> #include<conio.h> void main() { long no; clrscr(); printf("n Enter an integern"); scanf("%ld",&no); switch(no%10) { case 0: printf("n...
Program for finding difference of two dates

Program for finding difference of two dates

#include<stdio.h> #include<conio.h> void main() { int d1, m1, y1; /* first date */ int d2, m2, y2; /*...
Program for updating the date by one day

Program for updating the date by one day

#include<stdio.h> #include<conio.h> void main() { in d,m,y; clrscr(); printf("Enter date d, m, yn"); scanf("%d%d%d",&d, &m, &y); /* Increase the day...
Program for largest and second largest of three numbers

Program for largest and second largest of three numbers

#include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("Enter three numbersn); scanf("%d%d%d",&a,&b,&c); if((a<b)&&(a>c)) /* checking for a is largest */ ...
Program for updating the time by one second

Program for updating the time by one second

#include<studio.h> #include<conio.h> #include<math.h> void main() { int h,m,s; clrscr(); printf("Enter time h m sn); scanf("%d%d%d",&h,&m,&s); if((h<0)||(m<0)||(s<0)) /* hour or minute or...
Program for finding the area of triangle when three sides are given

Program for finding the area of triangle when three sides are given

#include<stdio.h> #include<conio.h> #include<math.h> void main() { float a,b,c,s,area; clrscr(); printf("Enter three sides a b cn"); scanf("%f%f%f",&a,&b,&c); if((a<=0)||(b<=0)||(c<=0)) /* a side of...
Program to largest of three numbers

Program to find largest of three numbers

#include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("Enter three numbersn"); scanf("%d%d%d",&a,&b,&c); if((a>b)&&(b>c)) /* use of logical &&, which gives true...
Program to finding the roots of quadratic equation

Program to finding the roots of quadratic equation

#include<stdio.h> #include<conio.h> #include<math.h> void main() { float a,b,c,d,root1,root2; clrscr(); printf("Enter a b c n"); scanf("%f%f%f",&a,&b,&c); d=b*b-4*a*c; /* finding determinant */ ...
Program for checking a number is positive negative or zero

Program to check a number is positive negative or zero

#include<stdio.h> #include<conio.h> void main() { int a; clrscr(); printf("Enter a numbern"); scanF("%d",&a); if(a>0) printf("n positive number n"); ...
program to check a number is even or odd

Program to check given number is odd or even

  #include<stdio.h> #include<conio.h> void main() { int a; /* for any integer */ clrscr(); printf("Enter a number n"); ...
- Advertisement -

Latest article

python program to find the GCD of two numbers using recursive

Python program to find the GCD of two numbers using recursive

def gcd(x,y):     if(y==0):       return x     else:       return gcd(y,x%y) x=int(input("Please enter first number: ")) y=int(input("Please enter second...
Python program to check find the given year is a leap year or not

Python program to check find the given year is a leap year or not

year=int(input("Please enter a year to be check leap year or not: ")) if(year%4==0 and year%100!=0 or year%400==0): print("This year is a leap...
Python program to find the LCM of two numbers using recursive

Python program to find the LCM of two numbers using recursive

def lcm(a,b): lcm.multiple=lcm.multiple+b if((lcm.multiple % a == 0) and (lcm.multiple % b == 0)): ...