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
Explain what is the difference between far and near ?
What is main () in c?
What is calloc in c?
application attempts to perform an operation?
What is property type c?
What is .obj file in c?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
What is identifier in c?
Is c object oriented?
What do you understand by normalization of pointers?
What are the different types of errors?
what is a constant pointer in C
List some of the static data structures in C?
how many key words availabel in c a) 28 b) 31 c) 32
Why pointers are used in c?