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 |
write a program to find the given number is prime or not
2 Answers Accenture, Vasutech,
Is it possible to have a function as a parameter in another function?
4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it. i have done maximum par but i m findind problem in the commented area. please help...
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
2 Answers Aricent, Manipal University,
What does %p mean?
main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } what is the output?
7 Answers AMCAT, HCL, Ramco, Zycus Infotech,
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
program to find the second largest word in a paragraph amongst all words that repeat more thn twice
what is the function of pragma directive in c?
What is getche() function?
Write a c program to find, no of occurance of a given word in a file. The word is case sensitive.
Difference between Function to pointer and pointer to function