Лучшие помощники
17 апреля 2025 10:20
471

Кто разбирается в Microsoft Visual Studio, помогите. 11 вариант

image
7 ответов
Посмотреть ответы

Задание 7

/* В стиле С */

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#include <conio.h>

int main(int argc, char **argv)

{

  double a,c,x,y;

  c = 0.85;

  printf("C=%lf\n",c);

  a=exp(c);

  printf("A=%lE\n",a);

  x=sin(a+c);

  x*=x;

  x*=a;

  x=x/c;

  x=x/a;

  printf("X=%lg\n",x);

  y=log(x+a);

  y=y*y;

  y+=x;

  y=pow(y,0.33333333333);

  printf("Y=%lg\n",y);

  getch();

  return 0;

}

/* В стиле С++ */

#include <iostream>

#include <cstdlib>

#include <conio.h>

#include <cmath>

using namespace std;


int main(int argc, char **argv)

{

  double a,c,x,y;

  c = 0.85;

  cout<<"C="<<c<<endl;

  //printf("C=%lf\n",c);

  a=exp(c);

  cout<<"A="<<a<<endl;

  //printf("A=%lE\n",a);

  x=sin(a+c);

  x*=x;

  x*=a;

  x=x/c;

  x=x/a;

  //printf("X=%lg\n",x);

  cout<<"X="<<x<<endl;

  y=log(x+a);

  y=y*y;

  y+=x;

  y=pow(y,0.33333333333);

  //printf("Y=%lg\n",y);

  cout<<"Y="<<y<<endl;

  getch();

  return 0;

}


0
·
Хороший ответ
15 ноября 2026 16:32

Задание 5

Стиль С

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#include <conio.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */


int main(int argc, char *argv[]) 

{

double e,a,b, fi,y,t;

e=4.2;

b=0.47*e;

b=b*pow(e,e);

a=b-log(b+b);

a=log(a);

y=a+b;

t=sin(y);

fi=t/(sqrt(y)+t);

printf("FI=%lg\n",fi);

getch();

return 0;

}

Стиль С++

#include <iostream>


/* run this program using the console pauser or add your own getch, system("pause") or input loop */

#include <cstdlib>

#include <conio.h>

#include <cmath>

using namespace std;

int main(int argc, char** argv) {

double e,a,b, fi,y,t;

e=4.2;

b=0.47*e;

b=b*pow(e,e);

a=b-log(b+b);

a=log(a);

y=a+b;

t=sin(y);

fi=t/(sqrt(y)+t);

cout<<"Fi="<<fi<<endl;

getch();


return 0;

}

0
12 ноября 2026 06:21

В стиле C++

#include <iostream>

#include <conio.h>

#include <cstdlib>

#include <cmath>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

using namespace std;

int main(int argc, char** argv) {

double gamma,a,x,t,y;

gamma=0.2;

a=1.45;

x=a+1.0/a;

x=log(x);

t=a+x;

y=1.0+t*t;

y=t/gamma;

y=y/sin(a);

y*=sin(t);

cout<<"Y="<<y<<endl;

getch();

return 0;

}

В стиле C

#include <stdio.h>

#include <stdlib.h>

#include <conio.h>

#include <math.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */


int main(int argc, char *argv[]) {

double gamma,a,x,t,y;

gamma=0.2;

a=1.45;

x=a+1.0/a;

x=log(x);

t=a+x;

y=1.0+t*t;

y=t/gamma;

y=y/sin(a);

y*=sin(t);

printf("Y=%lg\n",y);

getch();

return 0;

}

0
12 ноября 2026 06:16

Задание 4

В стиле С

#include <stdio.h>

#include <stdlib.h>

#include <math.h>>

#include <conio.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */


int main(int argc, char *argv[]) {

double alfa,b,a,x,t,y;

alfa=1.52;

b=0.32;

t=alfa+b;

a=exp(t)+1.0/t;

x=sqrt(a*a+b*b);

t=a+x;

y=log(t)/sin(t);

y/=alfa;

printf("Y=%lg\n",y);

getch();

return 0;

}

В стиле С++

#include <iostream>

#include <cstdlib>

#include <cmath>

#include <conio.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

using namespace std;

int main(int argc, char** argv) {

double alfa,b,a,x,t,y;

alfa=1.52;

b=0.32;

t=alfa+b;

a=exp(t)+1.0/t;

x=sqrt(a*a+b*b);

t=a+x;

y=log(t)/sin(t);

y/=alfa;

cout<<"Y="<<y<<endl;

getch();

return 0;

}

0
11 ноября 2026 14:52

В стиле С

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#include <conio.h>

int main(int narg, char **argv)

{

  double x,y,a,b,gamma;

  b= 3.264;

  a=pow(b,0.333333333333); /* корень кубический есть возведение в степень 1/3 ~= 0.33333333 */

  x=a*a+b*b;

  gamma=cos(a*b);

  y=a*sin(gamma)/x;

  y=tan(y);

  y=y/sqrt(x);

  y=0.5*y;

  printf("Y=%lg\n",y);

  getch();

  return 0;

}

То же самое в стиле С++


#include <iostream>

#include <cstdlib>

#include <cmath>

#include <conio.h>

using namespace std;


int main(int narg, char **argv)

{

  double x,y,a,b,gamma;

  b= 3.264;

  a=pow(b,0.333333333333); /* корень кубический есть возведение в степень 1/3 ~= 0.33333333 */

  x=a*a+b*b;

  gamma=cos(a*b);

  y=a*sin(gamma)/x;

  y=tan(y);

  y=y/sqrt(x);

  y=0.5*y;


  cout << "Y=" <<y<< endl;

  getch();

  return 0;

}

0
8 ноября 2026 15:34
Остались вопросы?
Найти нужный