Вы находитесь на странице: 1из 2

QUESTION A : #include <conio.

h> #include <iostream> using namespace std; int main() { float tempF,tempC; printf("\tEnter The Temperature In farhenheit: "); scanf("%f",&tempF); tempC=((tempF-32)/1.8); printf("\n\tTemperature In Centigrade is %.1f\370C",tempC); getch(); } QUESTION 2 #include <conio.h> #include <iostream> using namespace std; int main() { float num,avg,sum; int no; for(no=1;no<6;no++) { printf("enter integer %d : ",no); scanf("%f",&num); sum+=num; } avg=sum/5; printf("Average of above numbers is %.1f",avg); getch(); } QUESTION 3 #include <conio.h> #include <iostream> using namespace std; int main() { int i,num,small; printf("\tenter integer 1: "); scanf("%d",&small); for(i=2;i<11;i++) { printf("\tenter integer %d: ",i); scanf("%d",&num); if(num<small) small=num; }

printf("\n\tthe least num is %d",small); getch(); }

Вам также может понравиться