hi everyone
this is my code.

public class Qustion3B{
 
public static void main (String args[]){

 double sinx = Math.sin(0.5236);
 double cosx = Math.cos(0.5236);

sinx = Math.pow(0.5236,2);
cosx = Math.pow(0.5236,2);
double sum=sinx+cosx;

System.out.println("sine: " + sinx+"cosine: " + cosx +"sum: " + sum );
}
}

it continue to show me that i have mistake in (pow.,) but i can't see it.
:(
please help me

Your code ran for me, I got no errors.

thats weird..
i tried to run it on other computer,
it works now
thank you

Please help me in this java code - this is urgent

import java.io.*;
class cond
{
int a,b;
InputStreamReader I = new InputStreamReader (System.in);
BufferedReader br = new BufferedReader(I);
Void Accept()throws IOException
{
System.out.println("Enter 2 numbers");
a=Integer.parseInt(br.readLine());
b=Integer.parseInt(br.readLine());
}
Void Condition()
{
if(a==b)
System.out.println("They are equal--dono ek hi hai yaar!");
if(b<a)
System.out.println("A is greater than B--A, B se adhik hai");
if(a<b)
System.out.println(a+"is greater than"+b);
}
public static void main(String args[]) throws IOException
{
cond C = new cond();
C.Accept();
C.Condition();
}
}

commented: Not urgent - don't hijack old threads with unrelated questions. -3

hello Mangala_jois
you used V instead of a v in "void"
and u have a logical error
use this which is a slight modificatin of your code..

if(a==b)
System.out.println("They are equal--dono ek hi hai yaar!");
else if(b<a)
System.out.println("A is greater than B .... A, B se adhik hai");
else
System.out.println(b+"is greater than"+a);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.