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 is the function of volatile in c language?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
Do you know null pointer?
can any one tel me wt is the question pattern for NIC exam
Explain what are compound statements?
Is c call by value?
Write a program to implement queue.
what is the function of pragma directive in c?
What does c mean in basketball?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What are the header files used in c language?
Are there any problems with performing mathematical operations on different variable types?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?