Skip to content

Instantly share code, notes, and snippets.

@utkumalkocoglu
Created February 26, 2014 12:27
Show Gist options
  • Save utkumalkocoglu/9228647 to your computer and use it in GitHub Desktop.
Save utkumalkocoglu/9228647 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
int a,x;
int toplam=2,sayac=1;
printf("üstel sayıyı girin:");
scanf("%d",&x);
printf("\nn\t2^n\n");
printf("----------------------");
for(a=1;a<=x;a++)
{
while(sayac!=a)
{
toplam=toplam*2;
++sayac;
}
printf("%d\t %d\n",a,toplam);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment