Created
June 10, 2019 19:22
-
-
Save denizfurkan/3f1c858b72db7df3b1506e87e0669f8c to your computer and use it in GitHub Desktop.
This file contains 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
#include | |
int main(){ | |
int TekTop=0, CiftTop=0, i=1; | |
double CiftCarp=1, TekCarp=1; | |
for(i=1; i<=99; i++){ | |
if(i%2==0){ | |
CiftTop=i+CiftTop; | |
CiftCarp=i*CiftCarp; | |
} | |
else{ | |
TekTop=i+TekTop; | |
TekCarp=i*TekCarp; | |
} | |
} | |
printf("Cift Toplam %d\n", CiftTop); | |
printf("Cift Carpim %f\n", CiftCarp); | |
printf("Tek Toplam %d\n", TekTop); | |
printf("Tek Carpim %f\n", TekCarp); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment