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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program in c language to print your bio-data on the screen by using functions.

6839


List some of the static data structures in C?

1241


What is the difference between procedural and functional programming?

1134


Explain 'far' and 'near' pointers in c.

1186


What is "Hungarian Notation"?

1167


What is a nested formula?

1236


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

1288


What is a void pointer? When is a void pointer used?

1106


What extern c means?

1062


Tell us bitwise shift operators?

1145


Why is c called "mother" language?

1331


What is the use of function in c?

1248


Why n++ execute faster than n+1 ?

3148


is it possible to create your own header files?

1164


What is the right type to use for boolean values in c? Is there a standard type?

1060