Advertisement
r4lovets

Untitled

Feb 8th, 2019
427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(void)
  3. {
  4.     int p, k, r;
  5.  
  6.     printf("Enter p, k and r:\n");
  7.     scanf_s("%d%d%d", &p, &k, &r);
  8.  
  9.     if (r - p * 0,01 * k > 0)
  10.     {
  11.         int N = 1;
  12.         while (N*(r - p * 0,01 * k) < k)
  13.             N++;
  14.         printf("Кредит будет выплачен за %d лет", N);
  15.     }
  16.     else
  17.         printf("Кредит не будет выплачен");
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement