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

בעייה בהרצה, צריך עזרה

Featured Replies

פורסם

יש לי תרגיל לכתוב תוכנית שמגידירה שני מערכים דו ממדדים, A , B

A עם 3 שורות ו 6 עמודות

B 6 שורות ו3 עמודות

בA שמים בכל תא את המכפלה של מספר השורה במספר העמודה

ובB מעתיקים את A בהעתקה סיבובית , כלומר כל איברי השורה הראשונה של A יהיו בעמודה הראשונה של B.....

וצריך להדפיס את שני המערכים.

אז ניסיתי לעשות את זה:

#include <stdio.h>

#include <conio.h>

#define X 3

#define Y 6

typedef int arr[X][Y];

typedef int arr1[Y][X];

void array_a(arr a);

void array_b(arr a,arr1 b);

void print_a(arr a);

void print_b(arr1 b);

int main()

{

arr a;

arr1 b;

printf("Array A\n");

array_a(a);

print_a(a);

printf("\nArray B\n");

array_b(a,b);

print_b(b);

getch();}

void array_a(arr a){

int i,j;

for(i=0; i<X; i++)

for(j=0; j<Y; j++)

a[j]=i*j;

}

void array_b(arr a,arr1 b){

int i,j;

for(i=0; i<Y; i++)

for(j=0; j<X; j++)

b[j]=a[j];

}

void print_a(arr a){

int i,j;

for(i=0; i<X; i++)

for(j=0; i<Y; j++){

printf("%d\t",a[j]);

printf("\n");}}

void print_b(arr1 b){

int i,j;

for(i=0; i<Y; i++)

for(j=0; j<X; j++){

printf("%d\t",b[j]);

printf("\n");}}

וזה לא מפסיק לרוץ... מה הבעייה פה?

פורסם
  • מחבר

:kopfpatsch: הסתדרתי :yelclap:

רשמתי for(j=0; i<Y; j++){

במקום J רשמתי 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.