#include <stdio.h>
/*main関数の定義 */
int main(void)
{
int ai[] = {13,6,8,15,38};
int i , j, ans;
int sum = 0;
for(i=0; i<5 ;i++){
sum += ai[i];
}
for (j=0; j<5 ;j++){
ans = ai[j] * 100 / sum;
printf("%dのaiの和に対する百分率は%d%%です。\n", ai
[j
], ans
); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgovKm1haW7plqLmlbDjga7lrprnvqkgKi8KaW50IG1haW4odm9pZCkKewoJaW50IGFpW10gPSB7MTMsNiw4LDE1LDM4fTsKCWludCBpICwgaiwgYW5zOwoJaW50IHN1bSA9IDA7CgoJZm9yKGk9MDsgaTw1IDtpKyspewoJCXN1bSArPSBhaVtpXTsKCX0KCglmb3IgKGo9MDsgajw1IDtqKyspewoJCWFucyA9IGFpW2pdICogMTAwIC8gc3VtOwoJCXByaW50ZigiJWTjga5haeOBruWSjOOBq+WvvuOBmeOCi+eZvuWIhueOh+OBryVkJSXjgafjgZnjgIJcbiIsIGFpW2pdLCBhbnMpOwoJfQoKCXJldHVybiAwOwp9Cg==