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 |
Why we write conio h in c?
sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x?
what is the difference between exit() and _exit() functions?
Is c dynamically typed?
True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type
main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }
Tell me with an example the self-referential structure?
What does do in c?
How can you find the exact size of a data type in c?
Why shouldn’t I start variable names with underscores?
Which of the following are valid "include" formats? A)#include and #include[file.h] B)#include (file.h) and #include C)#include [file.h] and #include "file.h" D)#include <file.h> and #include "file.h"
What is malloc calloc and realloc in c?