Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <stdio.h>
- int main () {
- int cel,a,b,brojac=0,pomoshnazaprocent=0;
- float procent;
- scanf ("%d", & cel);
- for (;1;pomoshnazaprocent++)
- {
- scanf ("%d %d",&a,&b);
- if((a==0)&&(b==0))
- break;
- if (a+b==cel)
- brojac++;
- }
- procent=(brojac*100.0)/pomoshnazaprocent;
- printf("Vnesovte %d parovi od broevi chij zbir e %d\n",brojac,cel);
- printf("Procentot na parovi so zbir %d e %.2f%%",cel,procent);
- return 0;
- }
Add Comment
Please, Sign In to add comment