-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path8.34.cpp
More file actions
43 lines (43 loc) · 665 Bytes
/
8.34.cpp
File metadata and controls
43 lines (43 loc) · 665 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include<stdio.h>
#include<math.h>
int main( void )
{
/*int b,c,sayi,kupu;
int k=0;
printf("Aranilan sayilar : ");
for(int a=1;a<10;a++)
{
for(b=0;b<10;b++)
{
for(c=0;c<10;c++)
{
sayi=a*100+b*10+c;
kupu=pow(a,3)+pow(b,3)+pow(c,3);
if(sayi==kupu)
{
printf("%d, ",sayi);
k++;
}
}
}
}
printf("\n");
printf("Bu ozellige sahip %d adet uc basamakli sayi vardir.",k);
return 0;*/
int sayi = 2;
int toplam,yedek,x;
while(1){
toplam = 0;
yedek = sayi;
while(yedek != 0){
x = yedek%10;
toplam += pow(x,5);
yedek /= 10;
}
if(toplam == sayi){
printf("Sayi = %d",sayi);
break;
}
sayi++;
}
}