Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- int broj, cifra=0, max=1, najgolem=0;
- char c;
- while (scanf("%d", &broj))
- {
- if (broj==c)
- {
- break;
- }
- int pomosenB=broj;
- while (pomosenB>0)
- {
- pomosenB/=10;
- if (max<pomosenB)
- {
- max=pomosenB;
- }
- }
- if(max>najgolem)
- {
- najgolem=broj;
- }
- }
- printf ("Najgolema najznacajna cifra ima brojot %d i e na pozicija ", najgolem);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement