write a program to display the numbers having digit 9 in the
given range from 1 to 100
Answer / 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 |
What are disadvantages of C language.
difference between c and c++
Write a program to generate the Fibinocci Series
explain what are pointers?
Implement a function that returns the 5th element from the end in a singly linked list of integers in one pass.
There are 8 billiard balls, and one of them is slightly heavier, but the only way to tell was by putting it on a weighing scale against another. What's the fewest number of times you'd have to use the scale to find the heavier ball?
what is a pointer
4 Answers Bank Of America, TCS,
How do i store a paragraph into a string? for example, if i input a long paragraph, the program will read the words one by one and concatenate them until no word is left.
In scanf h is used for
write a proram to reverse the string using switch case?
Why c is a procedural language?
Why main is not a keyword in c?