This was my Ecs 102 (Introduction to Computing) Final Exam. I had a high enough grade, and the final was optional. I took advantage of this fact. Not sure if it was such a great idea, but you can be the judge of that. /* To the grader of this examination booklet, This exam is a rather simple test of my programming abilities. Instead, I wish to present something a little more challenging. Thank you for reading. Have a nice day. Michael J. DeMaria (1) Scheme (define eric 100) (define shawn 500) (define (count eric shawn) (let( (eesibert eric) ) (if (= eric shawn) eesibert (cons eesibert (count (+ eric 1) shawn)) ) ) ) (count eric shawn) (2) Cobol * 003020-GET-INT-PART * IF (NW-WORK-CHAR(NW-WX) NUMERIC) IF (NW-BLD-INTEGER > 99999999999) SET NW-WX TO NW-WLIM ELSE MOVE SPACE TO NW-WORK-CHAR (NW-WX) ELSE SET NW-WX TO NW-WLIM 003020-EXIT (3)(A) Assembly 297D:0100 MOV AH,02 297D:0102 MOV CX,0008 297D:0105 MOV DL,00 297D:0107 RCL BL,1 297D:0109 ADC DL,30 297D:010C INT 21 297D:010E LOOP 0105 297D:0110 INT 20 (3)(B) Ada with Ada.Text_IO; use Ada.Text_IO; procedure Get_Name is Name : String (1..80); Length : Integer; begin Put ("Enter your first name> "); Get_Line (Name, Length); New_Line; Put ("Hello "); Put (Name (1..Length)); end Get_Name; (4) I refuse to answer this question on the grounds that it conflicts with my religious beliefs. And who made up the rule that C must be programmed in english? If C was actually a language, it would not require the programmer to know the English language. To prove this point, I shall write a simple program in Latin. intus mainus() { intus pi; intus thetus; thetus = (XVII + III) * XLVI; forum (pi=I; pi /* Hey, it really works! */ main(l,i,I)char**i;{l/=!(l>(I=atoi(*++i))|| fork()&&main(l+1,i-1)||I%l); return printf("%d\n",l);} #include /* Ugly code alert! */ int main(void){int hello;int convert;printf("Hello World.\n"); printf("How many times do you want that repeated?\n"); scanf("%d",&hello);if(convert >=0){for(convert;convert>0; convert--){printf("%d, Hello World.\n");}}else{printf ("Sorry, you have entered an invalid number. Bye bye.\n");}} (8) Write in C. When I find my code in tons of touble, Friends and colleages come to me, Speaking words of wisdom: "Write in C." As the deadline fast approaches, And bugs are all that I can see, Somewhere, someone whispers: "Write in C." Write in C, write in C, Write in C, oh, write in C. LISP is dead and buried, Write in C. I used to write a lot of FORTRAN, For science it worked flawlessly. Try using it for graphics! Write in C. {guitar_solo();} And when the screen is fuzzy, And the editor is bugging me. I'm sick of ones and zeros, Write in C. Write in C, write in C, Write in C, yeah, write in C. Write in C. The remainder of this exam is left as an exercise for the grader. */