View Code of Problem 73

#include<stdio.h>
int main()
{
	int m,N;//ÕªÌÒ×Óm¸ö 
	scanf("%d",&N);
	int i,a[1000];
	//float sum=0;
	a[1] = 1;
	for(i=2;i<=N;++i)
	{
      a[i] = (a[i-1]+1)*2;
	}
	printf("%d",a[N]);
	return 0;
 } 

Double click to view unformatted code.


Back to problem 73