Advertisement
Guest User

Untitled

a guest
May 29th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include "stdio.h"
  2. #include "locale.h"
  3. #include "conio.h"
  4. #define A(n) (a=0;a<=n;a++)
  5.  
  6. int main()
  7. {
  8. setlocale(LC_ALL,"rus");
  9. int a,b,x=0;
  10. printf("Введите значения: \n");
  11. printf("b=");
  12. scanf("%i",&b);
  13. for A (10)
  14. {
  15. x+=a+b;
  16. a++;
  17. //printf ("Сумма = %i\n",x);
  18. }
  19. printf ("Конечная сумма = %i",x);
  20. getch();
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement