utkusaridede / cmpe150

Introduction to Computing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There may be errors. They are prepared in rush.

Old Lab Questions in Brief

1.1. Read and write. 2.1. Division operations. 3.1. Write the given time in seconds to digital version like 16:40:23. 3.2. Shooting an object from cliff. 3.3. Extended version of shooting an object with given time value. 4.1. Calculate the summation of user floats during the inputs are more than zero. 4.2. Calculate the summation of user floats with given number of floats. 4.3. Take characters one by one from user until exclamation point like 568.789! and calculate the real value of float(568.789). They are read as 'char'. 4.4. Simple Guessing Problem. It is same as the in lecture question. 4.add. Extended version of guessing problem. It changes the boundaries of guess. 5.1.a. Drawing Normal Pyramid. 5.1.b. Different version of Pyramid. 5.1.c. Extended version of 5.1.b with reversed pyramid. 5.2.a. If the summation of divisors(except the number itself) of a given number is equal to number, it is called as PERFECT NUMBER. Program decides the number is whether perfect or not. (ex. if the number is 6; 6%1=0 ,6%2=0, 6%3=0 and 1+2+3=6 => 6=6) 5.2.b. Finding all the perfect numbers to the given input. (ex. If the number is 1500; 6, 28, 496 are the perfect numbers between 2 and 1500) 5.3. Usage of pow() function in math.h class. It calculates the summation of digits in the power of 2. You should compile it with -lm argument. (ex. $ gcc lab5_q3.c -lm) 6.1.a. Finds the fibonacci number of given sequence. 6.1.b. It is the extended version of 6.1.a. The question is somehow complicated. Will be updated soon. You should compile it with -lm argument. Because of the math.h class. 6.2. It converts digits to their spelling and changes the letter to their upper or lower case version until the user enters "!" character. (ex. 6OsMaN7 => sixoSmAnseven) 7.1. It calculates the min., max. and med. with pointers as I mentioned in lecture. 8.1. Reads 5 integers from user and add them to array. Finally, prints them in reverse order to screen. 8.1.add. Same question with 8.1. In my opinion, I forgot the addition of the question. 8.2. It takes the size of an array and fill the array with size amount of floats. Finally, calculates the maximum and minimum number in array. 8.2.add. Same question with 8.2. In my opinion, I forgot the addition of the question. 8.3. They are array1 and array2. They are both in size of 5. They takes numbers in base 2 from user and add them to final array in size of 6. (ex. array1 = {1 1 1 1 1}, array2 = {0 0 0 0 1} and array1 + array2 in base 2 is result = {1 0 0 0 0 0}) 9.1. Summation and multiplication of polynomial numbers. (ex. if array1 = {5 4 3}, it means 5x^2 + 4x + 3) It is somehow complicated compared to other questions. 9.2. Almost same as the 9.1'th question.

The followings are about Strings, multi dimentional arrays and structures. Will be added soon.

10.1.a. 10.1.b. 10.1.c. 10.2.a. 10.2.b. 11.1. 11.2. 12.1.

About

Introduction to Computing


Languages

Language:C 100.0%