Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write a program to display the numbers having digit 9 in the
given range from 1 to 100



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

Post New Answer

More C Interview Questions

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.

4 Answers  


Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

0 Answers   Expedia,


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

1 Answers   Aricent, FHF,


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

0 Answers  


Where are local variables stored in c?

0 Answers  


Explain the use of bit fieild.

0 Answers  


What is the best way to comment out a section of code that contains comments?

0 Answers  


What will be the outcome of the following conditional statement if the value of variable s is 10?

0 Answers  


Is void a keyword in c?

0 Answers  


A program to allow an input operand and operator from the operator and read on the display and output operand.

0 Answers  


What does stand for?

0 Answers  


Categories