Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale (LC_ALL, "Russian");
- int chiselko = 0;
- int count = 1;
- int max=0;
- int number =0;
- do
- {
- cin>> chiselko;
- if (!cin)
- {
- cout<<("Не число");
- return 1;
- }
- if (chiselko>max)
- {
- max=chiselko;
- number = count;
- }
- count ++;
- }
- while (chiselko!=0 );
- cout<< "Самое большое значение = " <<max << " с номером "<< number ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement