Programarea Calculatoarelor

Previzualizare laborator:

Extras din laborator:

(pag. 07) : Lab 2: - 1. Conversie (baza 8, 16, 2);

- 2. Conversie

- 3. Calcule

- 4. Conversie

- 5. Conversie

(pag. 08) : Lab 3: 1. Develop a C/C++ program able to determine the:

a) arithmetical media of 3 real numbers

b) geometrical media of 2 integer numbers

2. Develop a C/C++ program able to define an integer variable that will be initialized with different integer constants. Display the result using the overloading of << operator and cout.

3. Define a string of printable characters that will be displayed with cout. Define other character strings using escape sequences. Verify the white spaces using.

(pag. 09) : Lab 4 : 1. Develop a C/C++ application that reads from the input 2 values for the variables R1 and R2 that represent resistors, and next determine and display the equivalent resistance of the serial and parallel grouping.

2. Read from the KB two real numbers. Display the minimum on a row and the maximum on the next row.

3. Read from the KB 2 int values that represent the catheters of a rectangular triangle. Determine the hypotenuses and the perimeter of the triangle. Display the results on different rows.

4. Read from the KB 2 int values, a and b (a0), where a and b are the coefficients of the equation ax+b=0. Solve the equation and display the result

5. Modify the application 1 considering that the int values are capacitors and determine the same values. Merge in an application both cases.

(pag.11) : Lab 5: 1. Write a program that displays the value of a 3-rd degree polynom, calculated in a certain point x.

2. Write a program that reads from the keyboard 3 values representing the lengths of a triangle’s sides and than displays the triangle’s area.

3. Write a program that reads an unsigned char value and displays the binary values resulting after recursively applying the shift right and the % operators.

4. Write a program that monitors a communications channel on 16/32/64 bits. In order to do that, read from the keyboard an unsigned int value a, that will be displayed in decimal, binary, octal and hexadecimal counting bases. Use a function for converting the number from base 10 in base 2.

Implement another function called getsets() that receives 3 parameters:

- x: the value read from the keyboard

- p: the position of a bit of those 16/32 or 64 bits (counting from the right).

- n: the number of bits that will be extracted from the array. The function returns, adjusted to the right, those n bits from the value x, starting with the position p, where p>8*sizeof(x) and p>n. Display the result in binary, octal and hexadecimal

5. Write a program that reads from the standard input an integer number and displays the number of zeroes from it’s binary representation

(pag. 14) : Lab 6: 1. Read from the keyboard 3 integer numbers (a, b and c). Determine the area of the rectangle that has the sides equal to a and b and verify if the rectangle’s diagonal is equal to c.

2. Verify if a natural number is a perfect square.

3. Write a program that calculates an, where a and n are read from the keyboard.

4. Write a program that reads from the keyboard an integer value n, and calculates n!.

5. Write a program that:

- determines the greatest prime number that’s smaller than a certain given number;

- determines all the prime numbers smaller than a given number;

6. Write a program that determines the greatest common divider of 2 integer values.

7. Write a program that determines all the divisors of a value introduced from the KB.

8. Calculate the product of 2 integer numbers using additions.

9. Write a program that determines the integer quotient of 2 integer numbers using a series of

Subtractions.

10. Write a program that determines the number of figures that compose an integer number read from the keyboard.

11. Write a program that reads from the keyboard n integer numbers. Display all the odd numbers and store in an array.

(pag. 20): Lab 7: 1. Write a C/C++ that determines the mean value of the negative/positive elements from a vector.

2. Write a C/C++ that determines the value of the minimum positive element from a vector.

3. Write a C/C++ application that reads from the keyboard an array of 10 integer values. Define and implement a function that receives the array as parameter and then displays its elements, ordered increasingly.

4. Write a C/C++ application that defines a password (as an array o characters).The program reads repeatedly the entries from the keyboard until the user enters the right password. Display the number of tries the user entered wrong passwords.

5.Write a C/C++ application that that reads from the keyboard 2 arrays of characters representing the name and surname of a person. Display them with capital letter, separated by a TAB space.

6. Write a C/C++ application that defines 2 matrices of integer values. The matrices dimensions and elements are read from the standard input. Write the functions that:

a) display the positions of the odd elements in each matrix;

b) display the sum of all even elements in both matrices;

c) display the sum of the 2 initial matrices;

7. Read from the keyboard the elements of a 3x3 float matrix. Re-arrange the columns so that the sum of a column's elements is smaller than the sum of the elements from the next column.

Observații:

Temele rezolvate din laboratoare. Programare C/C++, UTCN ETTI anul I, sem. 1

Download gratuit

Documentul este oferit gratuit,
trebuie doar să te autentifici in contul tău.

Structură de fișiere:
  • Programarea Calculatoarelor.doc
Alte informații:
Tipuri fișiere:
doc
Nota:
8/10 (1 voturi)
Nr fișiere:
1 fisier
Pagini (total):
74 pagini
Imagini extrase:
74 imagini
Nr cuvinte:
15 845 cuvinte
Nr caractere:
88 524 caractere
Marime:
60.37KB (arhivat)
Publicat de:
NNT 1 P.
Nivel studiu:
Facultate
Tip document:
Laborator
Domeniu:
Electronică
Predat:
la facultate
Materie:
Electronică
Profesorului:
Mircea Vaida, Cosmin Strilețchi
Sus!