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

What are the types of pointers in c?

1029


What is the advantage of using #define to declare a constant?

1096


what type of questions arrive in interview over c programming?

2031


How do you use a pointer to a function?

1087


What is the use of a static variable in c?

1062


How many identifiers are there in c?

1024


Can you please explain the scope of static variables?

1063


What are the types of i/o functions?

1345


How pointers are declared?

960


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1971


What is 1f in c?

2663


pierrot's divisor program using c or c++ code

2242


What is a nested formula?

1161


What are the c keywords?

1205


Write a C program to count the number of email on text

1921