assalam o alaikum ,
i have question regarding assignment. here is the code
----------------------------------------------------------------------------------------------------------
printf("%s%20s%29s","SUBJECTS","MARKS","Credit Hours");
for (i=0 ; i< 9; i++)
{
printf("\n%d\t\t\t", i);
scanf("%d", &m);
printf("\t\t\t\t\t\t\t");
scanf("%d", &ch);
}
-----------------------------------------------------------------------------------------------------------
output:
******
students marks credit hours
0 90
3
1 89
4
2 67
2
so the problem is with credit hours...when ever i scanf for credithours it goes into the next line.....and thus the table form gets disturbes...help me out in changing the syntex in such a way that all the user inputs get in a table form..