Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- int n, sum = 0;
- scanf("%d", &n);
- for(int i = 0; i <= n; i++)
- {
- sum += pow(2, n);
- }
- printf("sum = %f", sum);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement