print("№1")
a = 37*(25+87.5)-17*(4.5+1.9)
print("ответ: ",a)
print("")
print("№2")
a = float(input ("Введите число a: "))
b = float(input ("Введите число b: "))
c = float(input ("Введите число c: "))
d = float(input ("Введите число d: "))
a = ((a*b)/(c+d**4))
print("ответ: ",a)
print("")
print("№3")
a = float(input ("Введите число a: "))
b = float(input ("Введите число b: "))
c = float(input ("Введите число c: "))
a = ((a+2*b-3*c)/(5*a+4))
print("ответ: ",a)
print("")
print("№4")
a = float(input ("Введите число a: "))
b = float(input ("Введите число b: "))
a = ((a+b)/(a-b))+((a*b)/(3.14))
print("ответ: ",a)
#include "stdafx.h" #include "stdio.h" #include <time.h> #include <stdlib.h> class vector { private: int* m; int size; public : vector(int n = 0); vector(const vector &vector2); ~vector(); }; vector::vector( int n ) { if (n < 0) n = 0; size = n; m = new int[n]; if(!m) printf("Error"); else m = NULL; } vector::vector(const vector &vector2) { size = vector2.size; m = new int [size]; for(int i = 0; i<size;i++) m[i] = vector2.m[i]; printf("kopia stvorena !"); } vector::~vector() { delete[] m; } vector(int *m, int size) { srand(time(NULL)) if(!m) printf("error") else for(int i = 0; i < size; i++) m[i] = rand()% 99; } int main() { vector v1(45), system("pause"); return 0; }
Дорога в будущее и Бизнес со скоростью мысли