עבור לתוכן
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

פורסם

#include <stdio.h> void main() {
int a,b,c,d,M,N; int x,y; printf("enter a,b,c,d,M,N:\n"); scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&M,&N); x = (N-b*y)/a ;
y = (M-c*(N-b*y))/d;
printf("x = %d\n y = %d\n", x,y);  
}

מה הבעיה? לדעתי הבעיה עם המשתנים כי הם כאילו לא מוגדרים.. הוא כאילו לא יודע להביע את איקס או וואי ואם אני מאפס אותם אני לא חושב שהתרגיל נפתר נכון

פורסם
  • מחבר

סורי שזה כותב מגעיל לא יודע לסדר את זה

פורסם

איך אנחנו אמורים לומר מה הבעיה אם אנחנו לא יודעים מה התכנית אמורה לעשות מלכתחילה, איזה קלט אתה מזין ואיזו תוצאה אתה מקבל?

חוץ מזה, תערוך את הקוד כך שיהיה ברור יותר.

פורסם

ה-x שלך

יש בו ערך זבל.

תעשה x=0;

לדעתי זה אמור לפתור את הבעיה

פורסם

ה-x שלך

יש בו ערך זבל.

תעשה x=0;

לדעתי זה אמור לפתור את הבעיה

האם התכונת ל Y? כיוון שאת ה X מחשבים בשורה 9, כאשר משתמשים בY שלא מאותחל.


#include <stdio.h>
void main()
{
int a,b,c,d,M,N;
int x,y;
printf("enter a,b,c,d,M,N:\n");
scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&M,&N);
x = (N-b*y)/a ;
y = (M-c*(N-b*y))/d;
printf("x = %d\n y = %d\n", x,y);  
}

ארכיון

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

דיונים חדשים

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.