بسم الله الرحمن الرحيم
أخي الكريم / فادي
السلام عليكم ورحمة الله وبركاته
إليك أخي الكريم حل الواجب الخاص بالدرس الرابع علما بأن هذا الحل هو من الأخت فجر الإيمان من أحد المنتديات العربية وذلك من أجل إعطاء كل ذي حق حقه
كود:
import javax.swing.JOptionPane;
public class Test
{
public static void main(String args[])
{
int x;
x = Integer.parseInt(JOptionPane.showInputDialog("Enter the mark of student Please"));
if (x>=85 && x<=100)
{
JOptionPane.showMessageDialog(null,"The Student is Excellent");
}
else
{
if (x>=75 && x<85)
{
JOptionPane.showMessageDialog(null,"The Student is VGood");
}
else
{
if (x>=65&& x<75)
{
JOptionPane.showMessageDialog(null,"The Student is Good");
}
else
{
if (x>=55 && x<65)
{
JOptionPane.showMessageDialog(null,"The Student is Accepted");
}
else
{
if (x>=0 && x<55)
{
JOptionPane.showMessageDialog(null,"The Student is Failed");
}
else
JOptionPane.showMessageDialog(null,"You Did Not Enter Avalid Mark");
}
}
}
}
System.exit(0);
}
}