קיבלתי עבודה ויש תרגיל שאני צריך לשרשר מחרוזות ניסיתי לעשות זאת עם
הפקודה STRCAT אבל לא הולך אני יעלה לכאן הנה התרגיל
כתוב תוכנית הקולטת 50 ציונים.... ואת שמותיהם של התלמידים התוכנית תחשב
כמה תלמידים קיבלו ציון בתחום 40 ל90 ותדפיס את שמותיהם.........
הנה הקוד שאני כתבתי
#include <stdio.h>
#include <conio.h>
#include <string.h>void main ()
{
int i=1,x=0,y=0,grade;
char name;
char names;
while (i<=5)
{
i++;
puts("enter your name");
scanf("%s",&name);
puts("enter your grade");
scanf("%d",&grade);
if ((grade<90)&&(grade>40))
{
strcat(names, names);//כאן הבעיה !
x++;
}
else
{
y++;
}
}
printf("the yacas of the talmidim is %d",x/y);
getch();
}