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 enumerations in C

1154


What is string length in c?

1072


What is the purpose of ftell?

1073


What is scanf_s in c?

1111


What are the different types of objects used in c?

1023


Differentiate between calloc and malloc.

1258


Which programming language is best for getting job 2020?

1046


What are the different file extensions involved when programming in C?

1244


#include { printf("Hello"); } how compile time affects when we add additional header file .

1884


What is sizeof int?

1087


what will be maximum number of comparisons when number of elements are given?

1897


Why is void main used?

1090


What does do in c?

1037


Can an array be an Ivalue?

1087


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1063