-
-
Save huseyin/332c7d6c1db893625ff8 to your computer and use it in GitHub Desktop.
ilk c programı
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* OMU Bilgisayar Mühendisliği, Programlamaya Giriş II, | |
* 'C Programlama Diline Giriş' labaratuvar föy ödevi | |
* 2 sayısının üslerini rekürsif olmayacak şekilde almak. | |
*/ | |
#include <stdio.h> | |
main(void) { | |
int x = 0, y; | |
double z = 2; | |
scanf("%d", &z); | |
printf("n \t 2^n\n--------------\n"); | |
while (x <= y) { | |
if (x == 0) | |
z = 1; | |
printf("%d \t %f \n", x, z); | |
z = z * 2; | |
x++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment