Q:

Calculate The Serious Program Using Java

0

This Program is used to calculate the Serious Program.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Calculate The Serious Program Using Java
Jul 03, 2018  Serious Program,  4 Views
This Program is used to calculate the Serious Program.
// serious program 
import java.io.*; 
import java.text.*; 
import java.lang.Math; 

class ssva8 
{ 
public static void main(String arg[]) throws IOException 
{ 

double i=1.0,j=0.1; 
BufferedReader obj=new BufferedReader(new InputStreamReader(System.in)); 
System.out.print("\nENTER THE VALUE N>1.0 : "); 
double n=Double.parseDouble(obj.readLine()); 
System.out.print("\nENTER THE VALUE M>0.1 : "); 
double m=Double.parseDouble(obj.readLine()); 
System.out.println("\n"); 
NumberFormat nf= NumberFormat.getInstance(); 
for(i=0.0;i<=n;i=i+1.0) 
{ 
for(j=0.0;j<=m;j=j+0.1) 
{ 
System.out.print(nf.format(Math.sqrt(i+j))+ " "); 
} 
System.out.println("\n"); 
} 
} 
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now