RSS

A program to convert centigrade to fahrenheit and vice_versa

A program to convert centigrade to fahrenheit and vice_versa
#include<stdio.h>

void main() {

float c,f,ic,fi; printf(“Enter centigrade : “);

scanf(“%f”,&c); f=1.8*c +32;

printf(“\n\nFahrenheit equivalent : %f\n\nEnter fahrenheit : “,f);

scanf(“%f”,&fi); ic=(fi-32)/1.8;

printf(“\nCentigrade equivalent : %f”,ic);

}

 

A program to find simple interest

A program to find simple interest
#include<stdio>

void main{

float p,r,t,si,ci,amnt; int n;

printf(“Enter >> Principle, Rate, Time\n\n”);

scanf(“%f%f%f%d”,&p,&r,&t,&n);

si = (p*t*r)/100; printf(“\n\nSimple interest: %f”,si); }

 

A very simple program in C

#include<stdio.h>                //Program header file, contains input output headers

void main()                          // main function

{                                        // start brace , program starts here

printf(“Hllo World!!”);       // statement to print a line

}                                        // end program

 

Targeted fields to learn more

  • Computer Programming Languages
  • Web design
  • Business
  • Mathematics
 
Leave a comment

Posted by on February 22, 2011 in Fields to learn more

 
 
Follow

Get every new post delivered to your Inbox.