الأجوبة
//Java Program to Add Two Complex Numbers
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class ComplexNumbers {
// Main function to read two complex numbers and add them
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
double i1,j1,i2,j2;
System.out.println("Enter the real part and
imaginary part of the first complex number");
try{
i1=Double.parseDouble(br.readLine());
j1=Double.parseDouble(br.readLine());
}catch (Exception e){
System.out.println("An error occurred");
return;
}
System.out.println("Enter the real part and
imaginary part of the second complex number");
try{
i2=Double.parseDouble(br.readLine());
j2=Double.parseDouble(br.readLine());
}catch (Exception e){
System.out.println("error");
}}القوائم الدراسية التي ينتمي لها السؤال