Ticket #7585: Untitled2.cpp

File Untitled2.cpp, 722 bytes (added by sd.yegane@…, 9 years ago)
Line 
1#include<iostream>
2#include<conio.h>
3#include<stlib.h>
4#include<time.h>
5using namespace std;
6main()
7{
8 int max1=0; int max2=2; int x;
9 for(int i=1; i<=100;i++){
10 x=rand();{
11 if(x>max1){
12 max2=max1;
13 max1=x;{
14 `;'else if (x>max2)
15 max2=x;
16 }
17 cout<<"max="<<max2;}
18 getch();
19 return 0;
20 }}}
21