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
What is an operator?
What do you mean by dynamic memory allocation in c?
is it possible to create your own header files?
What is nested structure with example?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
What does a function declared as pascal do differently?
Why malloc is faster than calloc?
What is const volatile variable in c?
what is the diffrenet bettwen HTTP and internet protocol
What are linked lists in c?
Can we replace the struct function in tree syntax with a union?
Tell me with an example the self-referential structure?
Explain what are preprocessor directives?
What does the error message "DGROUP exceeds 64K" mean?