Created
December 26, 2020 21:38
-
-
Save muhammedfurkan/4c77723a5de59de059c4842841821a94 to your computer and use it in GitHub Desktop.
0 ile 10000 arasındaki sayıların basamaklarını bulmak
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 <stdio.h> | |
#include <conio.h> | |
int main() | |
{ | |
int a; | |
float birler, onlar, yuzler; | |
printf("3 basamakli sayi girin: "); | |
scanf("%d", &a); | |
if ((a > 99) && (a < 1000)) | |
{ | |
yuzler = (a / 100); | |
printf("Yuzler basamagi= %.0f \n", yuzler); | |
onlar = ((a / 10) % 10); | |
printf("Onlar basamagi= %.0f \n", onlar); | |
birler = (a % 10); | |
printf("Birler basamagi= %.0f \n", birler); | |
} | |
else | |
printf("Sayi 3 basamakli degil"); | |
getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment