Posts

Showing posts with the label assignment cpp simple program

assignment cpp simple program

 write a program to accept temperature in fahreheit and print it in centigrade #include<iostream.h> #include<conio.h> int main() { float centigrade,fahreheit; clrscr(); cout<<"centigrade value="; cin>>centigrade; fahreheit=centigrade*1.8+32; cout<<"centigrade value is="<<centigrade<<endl; cout<<"fahreheit value is="<<fahreheit<<endl; getch(); return 0; } OUTPUT cetigrade value=23 centigrade value is=23 fahreheit value is=73.40002 write a program to find sum of two value. #include<iostream.h> #include<conio.h> int main() { clrscr(); int first,second,sum; cout<<"enter first value="; cin>>first; cout<<"enter second value="; cin>>second; sum=first+second; cout<<"sum="<<sum; getch(); return 0; } OUTPUT enter first value=5 enter second value=5 sum...