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 |
1. Write the function int countchtr(char string[ ], int ch); which returns the number of times the character ch appears in the string. Example, the call countchtr(“She lives in NEWYORK”, ‘e’) would return 3.
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
2 Answers Aricent, Manipal University,
What is the diffences between Windows XP and Windows Visa
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
Where are local variables stored in c?
Explain the use of bit fieild.
What is the best way to comment out a section of code that contains comments?
What will be the outcome of the following conditional statement if the value of variable s is 10?
Is void a keyword in c?
A program to allow an input operand and operator from the operator and read on the display and output operand.
What does stand for?