עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

עזרה בקוד שכתבתי בשפת C

Featured Replies

פורסם

הקוד נכתב בבורלנד טורבו בשפת C.

בגדול הקוד שרציתי לרשום הוא שבוחרים ליגה א' או ב' כאשר לכל ליגה מוגדר 4 קבוצות שונות מראש ולאחר כתיבת שם כלשהו אותו שם מקבל קבוצה אקראית מהליגה שנבחרה.

הבעיה היא שאני מריץ את הקוד ורושם תו כלשהו הקוד נתקע.

תודה מראש לכל העוזרים :)


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<conio.h>


void main()
{
int i,k,j=0;
char league,name,team_A[4] [18]={"Juventus","Manchester City","Real Madrid","Barcelona"},
team_B[4] [18]={"Milan","Paris","Bayren","Manchester United"};


clrscr();
randomize();


printf("please enter a league(A/B)\n");
scanf("%c",&league);
while(league!='A' || league!='a' || league!='B' || league!='b');
{
printf("Please enter a league(A\B)\n)");
scanf("%c",&league);
if(league=='A' || league=='a' || league=='B' || league=='b')
{
printf("Ok league %c it is\n",league);
if(league=='A' || league=='a')
{
for(i=0;i<2;i++)
{
j=random(4)+1;
printf("Please enter your name\n",name);
scanf("%s",name);
printf("%s your team is: %s\n",name,team_A[j]);
}
} }
else if(league=='B' || league=='b')
{
for(k=0;k<2;k++)
{
j=random(4)+1;
printf("Please enter your name\n",name);
scanf("%s",name);
printf("%s your team is: %s\n",name,team_B[j]);
}
}
}
}

נערך על-ידי blank55

פורסם
  • מחבר

איזה מלך איך ראית את זה? שעה חיפשתי ולא מצאתי, בנוסף מצאתי טעויות אחרות.

תודה רבה!!!!!

אפשר לסגור את הדיון :)

נערך על-ידי blank55

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.