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

פורסם

שלום לכולם יש לי בעיה בשיעורי בית בלולאות for ומשום מה הקומפיילר זורק אותי החוצה .

הגדרתי לולאה של 10 זוגות ואחרי שאני רושם בפלט 2 זוגות הוא זורק אותי למרות שאני לא רואה שום בעיה לוגית

התרגיל:

קלט-100 זוגותשל מספרים

פלט-המספר המינימלי מבין כל המספרים הגדולים בכל זוג

הקוד:

#include<stdio.h>

void main()

{ int a,b,g,m,i;

printf("please enter 2 numbers\n");

scanf("%d %d",&a,&b);

if(a>b)

m=a;

else

m=b;

for (i=2;i<=10;i++);

{

scanf("%d %d",&a,&b);

if(a>b)

g=a;

else

g=b;

if(g<m)

m=g;

}

printf("the most minimal number is %d\n",m);

}

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

תודה מראש

פורסם

כתבת מיד אחרי ה for נקודה פסיק.

כך שבעצם התוכנית לא מבצעת את מה שהיה אמור להיות גוף הלולאה מספר פעמים כמו שרצית אלא סתם מקדמת את i .

ואפשר להוסיף קוד בצורה נורמלית לפורום ע"י לחצן הכנס קוד "#" .

ארכיון

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

דיונים חדשים

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.