Write a program to compute from centigrade to Fahrenheit

centigrade to Fahrenheit  formula (f=1.8*c +32) #include <stdio.h> int main()  {  float F,C;  printf(“Enter Temperature in Celsius : ” );  scanf(“%f”,&C);  F = (C * 1.8) + 32;  printf(“\n %.2f Celsius = %.2f Fahrenheit”,C, F);  return 0; }   More C programs are here http://projugaadu.com/category/topics/c-language/

Write a C program to enter a distance into kilometers to meter to convert, feet, inches, and centimeter.

//kilometers to meter#include <stdio.h> int main()  {  float km;  printf(“Enter Length in KiloMeter : “);  scanf(“%f”,&km);  printf(“\n %.2f KM = %.2f Meters”,km,km*1000);  printf(“\n %.2f KM = %.2f Feets”,km,km*3280.84);  printf(“\n %.2f KM = %.2f Inches”,km,km*39370.08);  printf(“\n %.2f KM = %.2f Centimeters”,km,km*1000*100);  return 0; } you can find more c programs and things here http://projugaadu.com/category/topics/c-language/

Write a C program to swap two numbers

//swap two numbers#include <stdio.h> int main()  {  int a,b;  printf(“Enter Value of a :”);  scanf(“%d”,&a);  printf(“Enter Value of b :”);  scanf(“%d”,&b);  a=a+b;  b=a-b;  a=a-b;  printf(“\nAfter Swapping Values a = %d b = %d”,a,b);  return 0; } You can get more c program here http://projugaadu.com/category/topics/c-language/

Write a c program for addition subtraction multiplication and division using function

#include<stdio.h> int main() { int i,j; printf(“\n Enter 1st Integer Value :”); scanf(“%d”,&i); printf(“\n Enter 2nd Integer Value :”); scanf(“%d”,&j); printf(“\n addition : %d”,i+j); printf(“\n multiplication : %d”,i*j); printf(“\n division : %d”,i/j); printf(“\n subtraction : %d”,i-j); return 0; }

Write a program how to find area of triangles (a=h*b*.5) , Where a = area h = height b = base

// how to find area of triangles  #include<stdio.h>int main(){float a,h,b;printf(“\n Enter height :”);scanf(“%f”,&h);printf(“\n Enter base :”);scanf(“%f”,&b);a=b*h*0.5;printf(“\n Area of triangle = %f”,a);return 0;}   You can get more related c programs here http://projugaadu.com/category/topics/c-language/

Write a program to calculate simple interest (i = (p*r*n)/100) ,Where i = Simple interest , p = Principal amount , r = Rate of interest , n = Number of years

#include <stdio.h> int main()  {  int n;  float p, r, I;  printf(“\n Enter Amount p :”);  scanf(“%f”,&p);  printf(“\n Enter Rate r :”);  scanf(“%f”,&r);  printf(“\n Enter No of Years n :”);  scanf(“%d”,&n);  I = (p*r*n)/100;  printf(“\n Interest = %.2f”,I);  return 0; }

Variable in C language

A variable in C language As we have seen before, an entity that can vary during program execution is called a variable. Variable names are names given to locations in memory. These locations can contain integers, real, or character constants. In any language, the types of variables it can support depend on the types of … Read more

Control Instructions in C language

As the name suggests “Control instructions”, it allows us to specify the order in which the different instructions in a program will be executed by the computer. In other words, the control instructions determine the “control flow” in a program. There are four types of Control Instructions in C. These are: Sequence control instructions Instructions … Read more