السلام عليكم ورحمة الله وبركاته
أنا أدرس فى كلية الهندسه ونأخذ لغة السى بلس والدكتور أعطانا برنامج فى المحاضره عن المصفوفات ولما أكتب البرنامج فى الفيجوال ستوديو لاينفذ المهمه التى فى السؤال ويظل يطلب رقم
السؤال يقول
write a program to read scores 20 student in five subject in mid term .after that read the scores of final exam .calculate and print totlal scores of each student in each subject and print these scores as table
وهذا هو الكود
#include "stdafx.h"
#include <iostream>
using namespace std;
int main(){
int mid[5][5],fin[5][5],sum[5][5],r,c,h;
cout<<"enter the scores midtirm";
for(r=0;r<=4;r++){
for(c=0;c<=4;c++)
{cin>>mid[r][c];
}}
cout<"Enter the final scores";
for(r=0;r<=4;r++)
{
for(c=0;c<=4;c++)
{cin>>fin[r][c];
}}
for(r=0;r<=4;r++)
{for(c=0;c<=4;c++)
{
sum[r][c]=mid[r][c]+fin[r][c];
cout<<sum[r][c];
}}
cin>>h;
return 0;
}فهل المشكله من الكود أم من البرنامج
وياريت يا إخوان تمدونى بدرس يشرح المصفوفات ومعها أمثله للفهم
ولكن الأأهم هو الكود أريد أن أتأكد منه