lundi 11 janvier 2021

I am getting 8 errors in this program.Please someone share the correct program [closed]

#include<iostream>
#include<cmath>
#include<stdio.h>
using namespace std;
std::string;
int main(void)
{
double x = 7.7, y = 9.8, a = 3.1, b = 5.2, sqrt, ln, cub, tg, pow ,t1,t2;
printf("enter x,y>");
cout <<(t1 = 1 / (pow)(b, 3) ((ln) (y / x)-(pow)(a, 2)*(pow)(x, 2) / (pow)(2*y, 2)));
cout << (t2 = (1 / a)*(tg)(a*x / 2) + (1 / a)*ln*tg*(a * x / 2));
printf("t1=%lg\n");
printf("t2=%lg\n");
printf("log(%f)=%f\n");
printf("tan(%f)=%f\n");
printf("pow(%f)=%f\n");
printf("sqrt(%f)=%f\n");
printf("exp(%f)=%f\n");
return 0;}

Please someone corect my code.Iam getting 8 errors in this program.I need this code urgently. EQUATIONS:-

t1=1 /b^3 (ln y / x - (a^2 x^2 / 2 y^2));
t2 = 1 / a tg (ax / 2) + (1 / a)ln tg (ax/ 2));

Aucun commentaire:

Enregistrer un commentaire