Subscribe For Free Updates!

We'll not spam mate! We promise.

Sunday 26 August 2012

C++ Code to Convert Fahrenheit to Celsius



// Convert Fahrenheit to Celsius
// Programmer name: Sohail Ahmed
// Dated: 16/05/2011

#include<iostream.h>
#include<stdio.h>
#include<conio.h>

void main()
{
clrscr();
float f[9];
float c[9];
int num=1;
for(int i=0; i<=9; i++)
{
cout<<"\nEnter Fahrenheit (F) "<<i<<": ";
cin>>f[i];
}
for(int j=0; j<=9; j++)
{
c[j]=(f[j]-32)*5/9;
}
for(int count=0; count<=9; count++)
{
cout<<"\nCentigrade (C) "<<count<<" is: "<<c[count];
}
getch();
}

Socializer Widget By CodingLovers
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment