Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale (LC_ALL, "Russian");
- int chiselko = 0;
- int count = 1;
- int max=-2147483648;
- int number =0;
- do
- {
- cin>> chiselko;
- if (!cin)
- {
- cout<<("Не число");
- return 1;
- }
- if (chiselko>max && chiselko!=0)
- {
- max=chiselko;
- number = count;
- }
- count ++;
- }
- while (chiselko!=0 );
- cout<< "Самое большое значение = " <<max << " с номером "<< number ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement