Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int num;
- int x;
- int total;
- int main()
- {
- printf("\nIntroduza um numero: ");
- fflush(stdin);
- scanf("%d", &num);
- for(x=1;x<=20;x++)
- total+=x*num;
- printf("\n\t Total: %d\n\n", total);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement