Computer Science, asked by agniuukee78, 11 months ago

I need to find numbers which are divisible by its own digits C++


this is the code i have now: (the problem is that it displays numbers that are divisible only by LAST its digit).


#include


using namespace std;


int main()

{

int n,d;

for (n=0; n<1000; n++){

int temp=n;

d=temp%10;


if(d!=0){

temp/=10;

if(n%d==0)

{ cout<
}


}


}

Answers

Answered by sneha1120
0

Answer:

plz write it in short version

Similar questions