One Question of the Day 85

Question 85: Programming to find the three digits that meet the following conditions: the hundred digit plus the single digit equals the tens digit, and the number is divisible by 5 and 7. Insert picture description here
#include<stdio.h>
int main()
{ int i,j,k; int num; for(num=100;num<1000;num++) { i=num/100; j=(num-i*100) /10; k=num%10; if(i+k







j&&num%50&&num%7==0)
printf("%d ",num);
}

}

Guess you like

Origin blog.csdn.net/drake_gagaga/article/details/114155720