by Dinesh Thakur Category: Array Pointer and Union


 #include <iostream.h>

 #include <conio.h>
 const int size = 7;
 void main(void)
              float temp[size],max;
              cout<< "enter the temperatures on days in a week"<<'\n';
              for(int i=0;i<size; i++)
                      cout<<"Temperature on day : "<< i+1<<" : "<<temp[i]<<'\n';
                      for(i=0; i<size; i++)
                              if (temp [i]>max)
                                  max= temp[i];
                                  cout<<"The maximum temperature in the week is " << max;
                                  cout<<"\n" ;

the size of an array

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Related Articles