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 is a memory leak? How to avoid it?
what is the code to display color fonts in the output?
What is the difference between c and python?
Is c still used in 2019?
What is indirect recursion? give an example?
what is the purpose of the code, and is there any problem with it. bool f( uint n ) { return (n & (n-1)) == 0; }
What does dm mean sexually?
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,
Differentiate between calloc and malloc.
Differentiate between a structure and a union.
How to set a variable in the environment list?
Tell us the difference between these two : #include"stdio.h" #include<stdio.h> define in detial.