الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

شؤال لو سمحتم

بدأه محمد123456 في 19 أبريل 2011 · 1 رد · 315 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركاته

إلى إخواني المبرمجين وأخواتي المبرمجات أرجو منكم حل هذا السؤال فيما يتعلق في إيجاد الأخطا لا أدري ماهي الأخطاء فأرجو المساعدة مع الشكر

أرجو ذكر السبب

a-The following portion of program will not compile successfully. Find the errors in the

program and rewrite it in the correct way that can compile successfully.

import Java.Util.*;

public class Q2_A {

public static void main (String[] args){

integer myInt;

char ch

string str;

myInt = 5.0;

ch = "M";

str = Ahmed;

System.Out.Println("enter your name:");

scanner sc= scanner(System.in);

str=sc_next();

System.out.println("hello " , str ,"/n" , myInt ,"/n" ,ch);d

}

}

ولدي هذا السؤال أرجو الإجابة عنه مع الشكر

c- The following is an English structure for a portion of a code; rewrite it in correct Java

Language Syntax.

1-If (the height is between 140cm and 230cm

Compute the weight as:(height -100 +age/10)*100

2-If NOT (both x and y are equal zero)

Display a message “You Win The Game”

هذا هو السؤال ولكن المنتدى لايسمح في جلب الكلام إلى مابعد

You Win The Game

وهذا السؤال أعرف إني أطلت عليكم ولكني أرجو مساعدتكم

e- Rewrite the following for statement using while statement

int i;

for (i=100; i>0; i=i-5)

System.out.println(i);

d- Rewrite the following nested if statements using switch statement

int selection=1;

String myColor=””;

if (selection==1)

myColor="Red";

else if (selection==2)

myColor="Green";

else if (selection==3)

myColor="Cyan";

else if (selection==4)

myColor="Blue";

else

myColor="Black";

System.out.println("Your lucky color is " + myColor);

,i, وهذا لا أعرف ماهو قصدو فيه

A- Write a complete Java program that asks the user to enter a number of lines using

Scanner class, then displays the following output using Standard Input/Output. It depends

on the number of lines that are entered by the user. Provide a screen shoot for the output

and name the class as Q3a_YourName

Enter number of lines: 6

*

**

***

****

*****

******

تم تعديل هذه المشاركة بواسطة محمد123456 في 19 أبريل 2011 في 17:43

#2
import java.util.Scanner;


public class arabteam 
{
	public static void main(String args[])
	{
		Scanner input = new Scanner(System.in) ;
		int x = input.nextInt();
		for(int i=0 ; i<x ; i++)
		{
			System.out.print('\n') ;
			for(int j=0 ; j<=i ; j++ )
			{
				System.out.print('*') ;
			}

		}

	}

}

اولا دا كود برنامج النجوم

ولكن يجب ان نري محاولاتك في باقي البرامج

مواضيع مشابهة