Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void)
- {
- int p, k, r;
- printf("Enter p, k and r:\n");
- scanf_s("%d%d%d", &p, &k, &r);
- if (r - p * 0,01 * k > 0)
- {
- int N = 1;
- while (N*(r - p * 0,01 * k) < k)
- N++;
- printf("Кредит будет выплачен за %d лет", N);
- }
- else
- printf("Кредит не будет выплачен");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement