Guest User

Untitled

a guest
Mar 19th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <stdbool.h>
  4. int main()
  5. {
  6. int m, n, i, sum = 0;
  7. bool plus = true;
  8. scanf("%d", &m);
  9. scanf("%d", &n);
  10. for(i = m; i <= n; i++)
  11. {
  12. sum = sum + (m * n);
  13. if(!plus)
  14. {
  15. putchar('+');
  16. }
  17. printf("%d*%d", m, n);
  18. plus = false;
  19. }
  20. printf("=%dn", sum);
  21. return 0;
  22. }
Add Comment
Please, Sign In to add comment