View Code of Problem 73

#include <stdio.h>
int main(){
	int n,sum=1;
	scanf("%d",&n);
	for(int i=0; i<n; i++)
	{
		sum=(sum+1)*2
	}
	printf("%d",sum);
	return 0;
}
/*
Main.c: In function 'main':
Main.c:8:2: error: expected ';' before '}' token
  }
  ^
*/

Double click to view unformatted code.


Back to problem 73