Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How I continue this program

0 votes
asked Oct 22, 2021 by Alibek (160 points)
Using system;
Class Hello World{
Static void Main(){
Double a, x, y, z;
Double x=1.542,  y=-3.264,z=8,05;
a=Math. Log (Math. Sqrt (Math. Exp(Math. Exp(Math. Pow (♡x-y)+Math. Pow(x, y)+z;
Console. WriteLine ($"a={a: F3}");
B=x-((Math. Pow (x, 3)/3))+Math. Pow (x, 5)/5;
Console. WriteLine ($"b={b: F3}");

1 Answer

+2 votes
answered Oct 23, 2021 by Peter Minarik (86,160 points)
edited Oct 30, 2021 by Peter Minarik

Your code is full of errors.

  • class is spelt with lower case.
  • static is spelt with lower case.
  • the name of the class (HelloWorld) must be one word, it cannot contain space (Hello World).
  • when setting the value to z, you have to use a decimal dot, not a coma.
  • when setting the value to a, your parentheses are not matched. I'm not sure where you want to close them, you must know your own formula.
  • Math. Pow (♡x-y) contains some funny characters in there. Furthermore, the Math.Pow() function needs two arguments, but you only provided one.
  • When printing to the console, the formatting should not contain a space after the colon. Correctly: Console.WriteLine($"a={a:F3}");
  • B is not declared. The compiler does not know what type you want to use.
  • B and b are two different variables. Identifiers are case sensitive in C# (and most programming languages)

And how to continue... First of all, fix the problems mentioned above. Then it's up to you. I'm not sure what else you would like to do in your program.

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.