Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 3:
- for(int i=0;i<10;i++){
- cin>>tab3[i];
- }
- if(tab3[0]==tab3[1] and tab3[1]==tab3[2] and tab3[2]==tab3[3] and tab3[3]==tab3[4] and tab3[4]==tab3[5] and tab3[5]==tab3[6] and tab3[6]==tab3[7] and tab3[7]==tab3[8] and tab3[8]==tab3[9]){
- cout<<"Not existing.";
- }
- else{
- if(tab3[0] < tab3[1]){
- min1=tab3[0];
- min2=tab3[1];
- } else{
- min1=tab3[1];
- min2=tab3[0];
- }
- for(int i=0;i<10;i++){
- if(min1>tab3[i]){
- min2=min1;
- min1=tab3[1];
- } else if(min2>tab[i] and tab[i]!= min1){
- min2=tab[i];
- }
- } cout<<min2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement