برامج

شباب ابي مساعدتكم في برنامج الجافا JCreator [الأرشيف] - برامج نت

المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : شباب ابي مساعدتكم في برنامج الجافا JCreator


Abu J3fr
11-27-2008, 10:01 PM
السلام عليكم
اخواني الدكتور طالب منا عمل 3 برامج بالجافا وانا مو عارف كيف اعملهم .,,,
واخر يوم للتسليم هو السبت يعني بكره ,,
البرامج هي :
الأول :



Part 1 : MinNumber

1-Using a scanner
2-Your program should ues While statement that ask user to enter a number five times.
3-Your program should ues if else statement to find the minimum of five numbers.




اعتقد انه واضح
يبي ادخل خمس ارقام والبرنامج يحسب اقل رقم
ودا كله باستخدام الـ While و if else
اما البرنامج الثاني :


Part 2 : EvenOdd

Write a program that a for loop to compute the sum of the even numbers and the sum of the odd numbers between 1 - 99


والبرنامج الثالث والأخير


Part 3 : OperatorsTest

Write a program using the Scanner / Switch and other statements if needed which simulates a calculator. Your program should take any numbers that are greater than 0 and operator from the user in the following format : number operator number ( - , + , * , / , % )

zakimoulayabdellah
11-28-2008, 01:28 PM
salamo 3likom
tafadal akhi
swfa aktoubo bl faransi
la premier partie consiste a trouver un min en utilisant des tableau
while
if
tu trouve ce code juste copier coller dans eclipse (je travail bcp avec eclipe )
soit Jcreator


import java.math.BigInteger;
import java.util.Scanner;
public class MinNumber {

public MinNumber() {
// TODO Auto-generated constructor stub
int i =0 ,j = 0 , min = 0 ;
int t[] = new int[5];
while(i < 5){

System.out.println("Entrez le "+i+" nombre :");
Scanner input_name = new Scanner(System.in);
int nb = input_name.nextInt();
t[i]=nb;
//System.out.println("ce que tu as saisie " + nb);
i++;
}
min = t[0];
while(j <t.length){
if( t[j] < min) min = t[j];
//else
j++;
}
System.out.println("le min est : "+min);

}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new MinNumber();

}

}

zakimoulayabdellah
11-28-2008, 01:50 PM
vous trouverez la solution de sl exercice 2



public class EvenOdd {

public EvenOdd() {
// TODO Auto-generated constructor stub


int sumpair =0, sumimpair=0 ;
for(int i = 1 ; i <= 99 ; i++){

int newvab = i%2;
if(newvab == 1)
{
sumimpair= sumimpair+i ;

}
else
{
sumpair = sumpair+i;

}
}
System.out.println("la somme des chiffres est impair : "+ sumimpair);
System.out.println("la somme des chiffres est pair : "+sumpair);
}

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new EvenOdd();
}

}

lebhero
11-28-2008, 02:40 PM
salam alaykoum ...
i wrote them too ..
hope they will help u

http://rapidshare.com/files/168239633/Excer.zip.html

all the problems are solved ..