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 happens if header file is included twice?
Explain what happens if you free a pointer twice?
What is the mean of function?
What is the advantage of a random access file?
Why is it important to memset a variable, immediately after allocating memory to it ?
What is a #include preprocessor?
What is main () in c?
What are the differences between new and malloc in C?
What is non linear data structure in c?
What is the advantage of c?
What is the use of the function in c?
What is #include conio h?
What is pragma c?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
how to execute a program using if else condition and the output should enter number and the number is odd only...