Advertisement
Salman_CUET_18

Untitled

Feb 20th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5.     int n, sum = 0;
  6.     scanf("%d", &n);
  7.     for(int i = 0; i <= n; i++)
  8.     {
  9.         sum += pow(2, n);
  10.     }
  11.     printf("sum = %f", sum);
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement