WiredWX Christian Hobby Weather Tools
Would you like to react to this message? Create an account in a few clicks or log in to continue.

WiredWX Christian Hobby Weather ToolsLog in

 


descriptionc program help plz.. Emptyc program help plz..

more_horiz
Aim: To write a program to solve the folowing expression.
1. x² + 2x³ * (2*x)
2. x + y² + z³

note: * = multiply

I've tried to solve the problem . i'am jsut the c language begineer. pzl help me to rectigy the error.
my program is as follows:

-------------------------------------------------------------------------------------------------

Code:

#include<stdio.h>
#include<conio.h>
void main ()
{
double x,y,z,a,b,c,p,q,r;
x=1;
y=2;
z=3;
printf ("%lf raised to %lf\n",a,pow(x,2);
printf ("%lf raised to %lf\n",b,pow{2(x,3)};
printf ("c=%lf",2*x);
printf ("solution1=%lf", a+b+c);
printf ("%lf raised to %lf\n",q, pow(y,2);
printf ("%lf raised to %lf\n",r, pow(z,3);
printf ("solution2=%lf",p+q+r);
getch();
}


-------------------------------------------------------------------------------------------------

The errors are:

c program help plz.. Errors10

Plz help me ...will he very thankful.. Thank You!

EDIT: if u can't understand my program. Plz write your own program. Thank You! Cheesy Grin (sparkly Cheesy Grin (sparkly Goofy

............................................................................................

c program help plz.. Vikikascopy
c program help plz.. Vikiphotoshopcopy
c program help plz.. Yahoovikicopy
c program help plz.. Vikimsncopy
c program help plz.. Vikiskypecopy
c program help plz.. Vikifirefoxcopy
c program help plz.. Vikigamercopy

descriptionc program help plz.. EmptyRe: c program help plz..

more_horiz
In the future please use the CODE tag when posting code.

At line 9, 13 and 14 you're missing the terminating ')'. That's what the compiler is complaining about. At line 10 you suddenly use '{' and '}' instead of '(' and ')'. Terminate the expressions and change the {} to () and you should be fine.

The warning is because you assign a value to 'z' but you never use 'z'.

Regards.

descriptionc program help plz.. EmptyRe: c program help plz..

more_horiz
Also, do not use "void main" use int main and return 0 at the end of the programming, proper programming practices always help Big Grin

descriptionc program help plz.. EmptyRe: c program help plz..

more_horiz
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum