Find the Factorial of Entered Number Programming

C Program to Find the Factorial of Entered Number

  • April 20, 2021
  • 0 Comments

Write a c program to take input from user and find the factorial C Code #include <stdio.h>#include <conio.h>#include <math.h>void main(){ int i, number, factorial =1; printf(“Enter number : “); scanf(“%d”,&number); if(number<0) printf(“error:negative number”); else if(number==0) printf(“factorial of 0 i 1”); else{ for (i=1; i<=number; i++) factorial*=i; printf(“factorial is of %d is %d”,number, factorial); } getch();} […]

Read radius of the circle and calculate area and circumference. Programming

C- Read Radius of Circle, Calculate Area and Circumference

  • April 20, 2021
  • 0 Comments

Write a c program to read radius of a circle and calculate area and circumference. The value of PI : 3.14159 C Code #include <stdio.h>#include <conio.h>#include <math.h>void main(){ float r, a, c; printf(“nEnter radius of a circle:”); scanf(“%f”,&r); a = M_PI*r*r; c = 2*M_PI*r; printf(“nArea of cicle = %f”,a); printf(“nCircumference of circle = %f”,c); getch();} […]

Display Multiplication Table of Entered Numbers Programming

C – Display Multiplication Table of Entered Numbers

  • April 20, 2021
  • 0 Comments

Write a c program to take input a number from user and display the multiplication table C Code #include <stdio.h>#include <conio.h>#include <math.h>void main(){ int number, i; printf(“Enter number : “); scanf(“%d”,&number); for(i = 1; i<=10; i++) printf(“n %d X %d = %d”, number, i, number*i); getch();} Output More experiment with multiplication table on c programming…  […]

Find Square Root of Entered Number Programming

C Program to Find Square Root of Entered Number

  • April 20, 2021
  • 0 Comments

Write a c program to take input from user and calculate square root of that entered number. C Code #include <stdio.h>#include <conio.h>#include <math.h>void main(){ float number; printf(“Enter number:”); scanf(“%f”,&number); printf(“square root of entered number %f is %f”,number, sqrt(number)); getch();} Output

find the largest number among three entered numbers Programming

C – Find the Largest Number Among Three Entered Numbers

  • April 20, 2021
  • 0 Comments

Write a program to take three integer number input from the user and find a greater number among them. C Code #include <stdio.h>#include <conio.h>#include <math.h>void main(){ int a, b, c; printf(“enter three numbers:”); scanf(“%d%d%d”,&a,&b,&c); if(a>=b && a>=c) printf(“%d is greater”,a); else if (b>=a && b>=c) printf(“%d is greater”,b); else printf(“%d is greater”,c); getch();} Output