Posts
Showing posts from June, 2016
My c++ program on weather report
- Get link
- X
- Other Apps
#include<iostream.h> #include < conio.h > #include < fstream.h > #include < stdlib.h > #include < stdio.h > #include < dos.h > #include < ctype.h > void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"..\\bgi"); setbkcolor(BLUE); settextstyle(4,0,5); outtextxy(150,50,"Weather Reports"); gotoxy(10,10); cout<<"Enter temperature of the seven days in C "; long double a[7]; int s=0,k=0,max,min; cin>>a[0]; cout<<a[0]<<"C,"; max=min=a[0]; for(int i=1;i<7;i++) {cin>>a[i];cout<<a[i]<<"C,"; if(a[i]>max) {max=a[i];s=i;} if(a[i]<min) {min=a[i];k=i;} } for(i=0;i<7;i++) {a[i]=300-a[i];} cleardevice(); setcolor(WHITE); settextstyle(1,0,4); outtextxy(85,15,"WEATHER REPORT OF THE WEEK");setcolor(YELLOW); setbkcolor(BLACK); line(48,60,638,60); rectangle(50,70,520,440);re...