+ 1
how can i solve this equation in consol C# please i have a quiz and i need the answer
z=(2*x) + y
14 Réponses
+ 2
public static void Main(String[] args){
double Z = equation(any value, any value);
Console.WriteLine("result: "+ Z);
Console.ReadKey();
}
public static double equation(double x, double y){
return ( 2 * x ) + y;
}
+ 1
are you sure
+ 1
ok but i want to ask you question
0
well, I just typed it without codeblocksuor Devcpp so I'm not sure 100% but I think it's correct
0
and u can add another variable E=2*x
to get: z=E+y
0
yes !
0
when i write my program the black window deosnt appear why
0
what black window 0.o
0
what programme do you use
0
visual studio
consol c#
0
when i make run for my program the output deosnt appear
- 1
I didn't use this program before I suggest you to download codeblocks and work it's clear then visual studio... type in YouTube :how's to download codeblocks and install bcz there is some tips to make it work with the compiler...
- 1
your problem with the compiler then just type how to solve compiler issue in virtual studio
- 3
main()
{float x,y;
printf ("give x");
scanf ("%f",&x);
printf ("give y");
scanf ("%f",&y);
printf ("z=%f,((2*x)+y));
system ("pause");
}