Initial commit
This commit is contained in:
39
src/C/task4.c
Normal file
39
src/C/task4.c
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(){
|
||||
|
||||
int biggest = 0;
|
||||
|
||||
for (int i = 100; i < 1000; i++)
|
||||
{
|
||||
for (int j = 100; j < 1000; j++)
|
||||
{
|
||||
int x=i*j;
|
||||
int z=x;
|
||||
int y=0;
|
||||
|
||||
while (x != 0)
|
||||
{
|
||||
y = y * 10;
|
||||
y = y + x%10;
|
||||
x = x/10;
|
||||
}
|
||||
|
||||
//printf("%d - %d\n", y, z);
|
||||
|
||||
if (y==z & y>biggest){
|
||||
biggest = z;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
printf("%d\n", biggest);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user