Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int findbiggest(int numb)
- {
- int big=0;
- while (numb!=0)
- {
- if (big<(numb%10)) big=numb%10;
- numb/=10;
- }
- return big;
- }
- int main()
- {
- int a, b;
- cin >> a >> b;
- cout << "Didziausias A skaiciaus skaitmuo - " << findbiggest(a) << "\nDidziausias B skaiciaus skaitmuo - " << findbiggest(b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement