In given range, print all numbers having unique digits.e.g. in range 1 to 20 should print all numbers except 11.
Answers
Answered by
0
in which PLanguage? Please specify.
Or you can use this logic.
#introduce a loop for 1 to 20.
#inside loop check the value of each loop variable if value a 11 dont print anything else print the value. for ex. in c++ you can as
#include<iostream. h>
int main()
{
for(a=0;a<21;a++)
{
if(a==11)
{}
else
cout<<a;
}
return 0;
}
Or you can use this logic.
#introduce a loop for 1 to 20.
#inside loop check the value of each loop variable if value a 11 dont print anything else print the value. for ex. in c++ you can as
#include<iostream. h>
int main()
{
for(a=0;a<21;a++)
{
if(a==11)
{}
else
cout<<a;
}
return 0;
}
Similar questions
Physics,
7 months ago
Physics,
7 months ago
English,
7 months ago
Social Sciences,
1 year ago
English,
1 year ago
Political Science,
1 year ago
Science,
1 year ago