Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by klinik ( 13 years ago )
#include <stdio.h>
int main(){
//Argumenti
int a=1,b=1,c,x=0,p=0,h=0;
float pr;
//Vnesuvanje
scanf("%d", &c);
//While 1st
while( x != c){
//While 2nd
while(a != 0 && b != 0){
scanf("%d %d", &a, &b);
h++;
//If dali se razlicni od nuli
if(a != 0 && b != 0){
x = a+b;
} else {
break;
}
//Zgolemuvanje na brojot na parovi
if(x == c) p++;
}
//Procent
pr=(p*100)/h;
//Da izleze od while
break;
}
//Printanje
printf("Vnesovte %d parovi chij zbir e %d\n", p, c);
printf("Procentot na parovi so zbir %d e %.2f", c, pr);
}
Revise this Paste
Parent: 68335