Нужно перевести cout/cin в printf/scanf - c++ #include #include using namespace std; int main() { float a_1, a_2, a_3, x; cout < < "vvod a_1, a_2, a_3" < < endl; cin > > a_1 > > a_2 > > a_3; cout < < "proizved " < < a_1*a_2*a_3 < < endl; cout < < "sred geometr" < < pow (a_1*a_2*a_3, 1./3) < < endl; cout < < "vvod x" < < endl; cin > > x; cout < < "po form: " < < exp(1/(3*(3*x*x-pow(pow(x+1,4) +log((pow(x,4)+4)/(pow(x,2)+ 1./5)) < < endl; int a; cout < < "vvod a" < < endl; cin > > a; int c=a%10*10+a/10; cout < < c < < endl; system ("pause"); }
#include <math.h>
#include <stdlib.h>
int main() {
float a_1, a_2, a_3, x;
printf ("vvod a_1, a_2, a_3\n");
scanf ("%f %f %f",&a_1,&a_2,&a_3);
printf ("Proizved = %f\n",a_1*a_2*a_3);
printf ("Sred geometr = %f\n",pow(a_1*a_2*a_3, 1.0/3));
printf ("vvod x\n");
scanf ("%f",&x);
printf ("Po form: %f\n",exp(1.0/(3*x))-abs(3*x*x-pow(pow(x+1,4)+log((pow(x,4)+4)/(pow(x,2)+2)),1.0/5)));
int a;
printf ("vvod a\n");
scanf ("%d",&a);
int c=a%10*10+a/10;
printf ("%d",c);
system ("pause");
}
Пример:
vvod a_1, a_2, a_3
2 3 5
Proizved = 30.000000
Sred geometr = 3.107233
vvod x
4
Po form: -42.913096
vvod a
71
17