30.12.2019 Views

calisma_sorulari

  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}

sayac++;

}

}

printf("\n\nBu kurala uygun %d sayi var" ,sayac);

getche();

3. Klavyeden girilecek bir tamsayının faktöryelini hesaplayan C programını while döngüsünü

kullanarak yapınız.

#include <stdio.h>

#include <conio.h>

main()

{

int sayi, faktoryel = 1;

printf("Bir sayi giriniz : ");

scanf("%d",&sayi);

while(sayi>0) {

faktoryel *= sayi;

sayi --;

}

printf("Faktoryel = %d" ,faktoryel);

getche();

}

4. Aşağıdaki programın çıktısını yazınız.

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!