Monday, August 15, 2022
Home C Language C Programm

# C Programm

### Program to calculate sales man salary

#include<stdio.h> #include<conio.h> void main() { float amount, sal, price; int qty; clrscr(); ...

### Program to take amount as Rupee and paise and print it as paise

#include<stdio.h> #include<conio.h> void main() { float rp; int r,p; clrscr() ; printf("n Enter amount n") ; ...

### Program to perform all arithmetic operations on two integers

#include<stdio.h> #include<conio.h> void main() { int a,b,c; /* a,b for input and c for result */ clrscr(); printf("enter two integersn); ...

### Program to find compound interest

#include<stdio.h> #include<conio.h> void main() { float p,t,r,ci; /* p-> principle amount, t-> time in years, ...

### Program to find simple interest

#include<stdio.h> #include<conio.h> void main() { float p,t,r,si; /* p-> principle amont, t-> time in years, ...

### Program to convert the temperature Fahrenheit to celsius

#include<stdio.h> #include<conio.h> void main() { float c,f; /* c for celsius and f for Fahrenheit */ clrscr(); print("enter Fahrenheitn"); ...

### Program to convert the temperature from Celsius to Fahrenheit

#include<stdio.h> #include<conio.h> Void main() {    float c,f;        /*c for Celcious and f for Fahrenheit*/    clrscr();    printf(“enter celciousn”);    scanf(“%f”,&c);    f=(c+32)*9/5;    c*9/5+32;   ...

### Program to find area of triangle when height and base are given

#include<stdio.h> #include<conio.h> void main() {    float h,b,a;          /*h for height, b for base and a for area*/    clrscr();    printf(“enter height and base of trianglen”); ...

### Program to find volume of sphere

#include<stdio.h> #include<conio.h> #include<math.h> #define pi 3.142 void main() {   float r,v;                   /* r for radius and v for volume*/   clrscr();   printf(“enter radius of spheren);   scanf(“%f”,&r);       ...

### Program to find the area of rectangle

#include<stdio.h> #include<conio.h> void main() { float a,b,area;     /* a, b for 2 sides and area for result */ clrscr(); printf("enter two sides of rectangle...

### 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

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

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