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
write a program in c language to print your bio-data on the screen by using functions.
List some of the static data structures in C?
What is the difference between procedural and functional programming?
Explain 'far' and 'near' pointers in c.
What is "Hungarian Notation"?
What is a nested formula?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
What is a void pointer? When is a void pointer used?
What extern c means?
Tell us bitwise shift operators?
Why is c called "mother" language?
What is the use of function in c?
Why n++ execute faster than n+1 ?
is it possible to create your own header files?
What is the right type to use for boolean values in c? Is there a standard type?