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...

count the numbers between 100 and 300, that star
with 2 and ends with 2

Answer Posted / sushma s

PL\SQL Code:

Declare
n number(10) := 0;
begin
for i in 100 .. 300
loop
if (substr(i,1,1) =2) and (substr(i,length(i),1) = 2) then
n := n +1;
dbms_output.put_line('number :'|| i ||' count:' ||n);
end if;
end loop;

end;

O/P: count: 10

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can I convert a string to a number?

1073


Explain modulus operator. What are the restrictions of a modulus operator?

1002


What is c language used for?

967


What is hash table in c?

1013


largest Of three Number using without if condition?

1580


What is use of #include in c?

1146


Explain what are the different file extensions involved when programming in c?

1096


Write a simple code fragment that will check if a number is positive or negative.

1138


Why doesnt this code work?

1048


What is malloc calloc and realloc in c?

1298


What are logical errors and how does it differ from syntax errors?

1284


Can the sizeof operator be used to tell the size of an array passed to a function?

1100


What is a example of a variable?

999


What is a pointer in c plus plus?

1289


What is the difference between union and structure in c?

1155