مثال N4 مبانی کامپیوتر و برنامه سازی

import java.util.*;
public class N4 {
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
int i;
double sum=0 , x;
for(i=0 ; i<6 ;i++)
{
System.out.print("Lotfan nomreyeh "+(i+1)+"-om ra vared kon: ");
x=input.nextDouble();
sum=sum+x;
}
System.out.println("moadele = "+sum/6);
}
}

مثال N3 مبانی کامپیوتر و برنامه سازی

import java.util.*;
public class N3 {
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
int a , b , i;
System.out.print("Please enter a: ");
a=input.nextInt();
System.out.print("Please enter b: ");
b=input.nextInt();

for (i=a ; i <=b ; i=i+3)
System.out.println(i);

}

}

 

مثال N2 مبانی کامپیوتر و برنامه سازی

public class N2 {
public static void main(String[] args)
{
int i;
for(i=1 ; i <= 10 ; i++)
System.out.println(i);
}
}

مثال N1 مبانی کامپیوتر و برنامه سازی

************************************************
N1:

import java.util.*;
public class first {
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
int x, price;
System.out.print("Please enter WAT: ");
x=input.nextInt();
switch (x)
{
case 40:
price=1200;
System.out.println("\n Gheymat="+price);
break;
case 60:
price=1500;
System.out.println("\n Gheymat="+price);
break;
case 80:
price=2000;
System.out.println("\n Gheymat="+price);
break;
case 120:
price=2800;
System.out.println("\n Gheymat="+price);
break;
case 160:
price=3200;
System.out.println("\n Gheymat="+price);
break;
case 200:
price=4000;
System.out.println("\n Gheymat="+price);
break;
default:
System.out.println("Meghdare vared shode sahih nist.");
}
}
}


نمرات میانترم نظریه محاسبه - ترم بهمن سالتحصیلی 97-96

 ردیف   شماره دانشجویی   نمره 
1  ٩۵۴٣١٠٠٢  5.25
2  ٩۵۴٣١٠۶۴
3  ٩٢۴٢١٠٠۶  -
4  ٩۴۴٣١٠٠٨ 4.5 
5  ٩۴۴٣١٠١١  6
6 ٩۵۴٣١٠١٣ 5.25
7 ٩۵۴٣١٠١۶ 3
8  ٩۴۴٣١٠۶٣  6
9  ٩۴۴٣١٠٢١ 4.25 
10 ٩۴۴٣١٠٢٠ 4.5
11  ٩۴۴٣١٠٢۵
12  ٩۴۴٣١٠٢۶
13  ٩۴۴٣١٠٢٨
14  ٩۴۴٣١٠٣۴
15  ٩۴۴٣١٠٣۵
16  ٩٢۴٣١٠٢٣  5
17  ٩۴۴٣١٠٣٩ 5.25 
18  ٩۵۴٣١٠۴٢  2.5
19  ٩۴۴٣١٠۴۴ 5.25 
20  ٩٠۴٣١٠۴٠  -
21  ٩۴۴٣١٠۴٧
22  ٩۵۴٣١٠۴۴  3.5
23  ٩٣۴٣٢٠٢٩  3
24  ٩٣۴٣١٠٣٢
25  ٩۴۴٣٢٠٣۶ 3.5 
26 ٩۵۴٣١٠۵٢ 3
27  ٩٣۴٣١٠٣۴  5.5
28  ٩٢۴٣١٠٣٧  3.5
29  ٩۴۴٣١٠۶٠  5.5
30 ٩۵۴٣١٠۵۵ 5.5