Write a program to convert temperature Fahrenheit to Centigrade

temperature Fahrenheit to Centigrade degrees c program

Write a program to convert temperature Fahrenheit to Centigrade Input temperature in fahrenheit from user. Store it in some variable say fahrenheit. Apply the temperature conversion formula celsius = (fahrenheit – 32) * 5 / 9. Print the value of celsius. Example Input Temperature in fahrenheit = 205 Output Temperature in celsius = 96.11 C Temperature conversion formula … Read more

C Program to Find Factorial of a Number

factorial program example in c

C Program to Find Factorial of a Number The factorial of a positive number n is given by: factorial of n (n!) = 1*2*3*4….n The factorial of a negative number doesn’t exist. And, the factorial of 0 is 1, 0! = 1 #include <stdio.h> int main() { int n, i; unsigned long long factorial = 1; … Read more

Egg Game Program in C Langauage

C Programming Tutorial

Egg Game Program in C Langauage   #include<dos.h> #include<graphics.h> #include<stdio.h> #include<conio.h> #include<process.h> #include<dos.h> #include<stdlib.h> #include<iostream.h> union REGS i,o; main() { int initmouse(); int restrictmouseptr(int,int,int,int); int getmousepos(int *,int *,int *); int showmouseptr(); int gd=DETECT,gm,maxx,maxy,x,y,button; initgraph(&gd,&gm,””); int count=0; maxx=getmaxx(); maxy=getmaxy(); setbkcolor(1); setviewport(0,0,maxx,maxy,1); gotoxy(26,1); if(initmouse()==0) { closegraph(); restorecrtmode(); //to go back to normal graphics mode or deleting viewport. … Read more

C program to find armstrong number

C Programming Tutorial

What is Armstrong number? Sum of a number’s digits raised to the power total number of digits is armstrong number. Armstrong numbers example: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634 etc Explanation: 3 = 3^1 = 3 153 = 1^3 + 5^3 + 3^3 = 153 Non-Armstrong … Read more