Question:
Write commands to declare character variables named faculty_last_name, faculty_first_name, and faculty_phone. Assign the value ‘COX’ to faculty_last_name, ‘KIM’ to faculty_first_name, and 7155551234 to faculty_phone. Write program commands so that the program displays the output exactly as follows:

Kim Cox’s phone number is (715) 555-1234.

everyone can teach me???

Recommended Answers

All 3 Replies

everyone can teach me???

but who will pay me ?

everyone can teach me???

I sincerely doubt whether anyone can.

declare
    faculty_last_name   varchar2(80) := 'COX';
    faculty_first_name  varchar2(80) := 'KIM';
    faculty_phone       varchar2(80) := '7155551234';
begin
    dbms_output.put_line 
    (
        initcap(faculty_first_name) || ' ' || initcap(faculty_last_name) || '''s phone number is (' || 
        substr (faculty_phone, 1, 3) || ') ' ||
        substr (faculty_phone, 4, 3) || '-' ||
        substr (faculty_phone, 8, 4)
    );
end;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.