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 are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
What is && in c programming?
What is meant by operator precedence?
Why does notstrcat(string, "!");Work?
What is a c token and types of c tokens?
What are the types of data files?
Explain how can I convert a number to a string?
What is ## preprocessor operator in c?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What is file in c preprocessor?
Which node is more powerful and can handle local information processing or graphics processing?
Explain what is the benefit of using an enum rather than a #define constant?
What is a stream in c programming?
How do you determine whether to use a stream function or a low-level function?
Explain built-in function?