View Single Post
ישן 09-05-07, 22:04   # 4
nanadav
הוסטסניון
 
מיני פרופיל
תאריך הצטרפות: Dec 2005
גיל: 34
הודעות: 1,946

nanadav לא מחובר  

ציטוט:
נכתב במקור על ידי רותם צפה בהודעה
סליחה על הדאבל.

אני לא מצליח מישו מה לפתור את שאלה 7... אם מישהו יכול למצוא את הטעות שלי בקוד שאני יציג לפניכם יבורך כי פשוט אין לי מושג מה לא עשיתי טוב.

השאלה:
http://www.2send.us/picture.php?file=3294d99137.JPG

התשובה שלי לשאלה:
http://www.2send.us/uploads/57d9fcab60.txt

מקווה שתעזרו .
אני לא יכול לבדוק למה לא עשית טוב כי אני לא מבין את השפה שבה אתה משתמש.
עשיתי לך פתרון בשפת JAVA מקווה שזה יעזור לך:
קוד:
public class help {
	public static void main(String[] args){
	int[] classs=new int [68];
	int[] plastik=new int [68];
	int[] solelot=new int [68];
	int sum=0, sum1=0;
	for(int i=0;i<68;i++){
		classs[i]=IO.readInt("press your class number: ");
		plastik[i]=IO.readInt("press the number of the plastik bottels: ");
		solelot[i]=IO.readInt("press the number of the solelot: ");
		if(classs[i]==1){
			sum+=(plastik[i]*3)+(solelot[i]*7);}
			else
			sum1+=(plastik[i]*3)+(solelot[i]*7);}
			if(sum>sum1)
				IO.writeln("Class Number one win in the compettiton!!!");
				if(sum==sum1)
				IO.writeln("TEKO");
				if(sum<sum1)
				IO.writeln("Class Number tow win in the compettiton!!!");
	
	}
}
  Reply With Quote