write a program to display the numbers having digit 9 in the
given range from 1 to 100
Answer Posted / neha
public class DisplayNumbers {
public static void main(String args[])
{
int num=0,Nine=9;
for(int i=1;i<100;i++)
{
int rem=i/10;
num=i%10;
if(num==Nine || rem==Nine)
{
System.out.println("Number is :: "+ i);
}
}
}
}
| Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
what are enumerations in C
What is string length in c?
What is the purpose of ftell?
What is scanf_s in c?
What are the different types of objects used in c?
Differentiate between calloc and malloc.
Which programming language is best for getting job 2020?
What are the different file extensions involved when programming in C?
#include
What is sizeof int?
what will be maximum number of comparisons when number of elements are given?
Why is void main used?
What does do in c?
Can an array be an Ivalue?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;