sample output:
Enter the number for m: 3
Enter the 9 integers: 2 7 6 9 5 1 4 3 8
Table Format:
2 7 6
9 5 1
4 3 8
Remarks: It is a magic square!
the number of integer depends in number you entered on m
i made this code in 3 days T_T
#include <stdio.h>
void input (int m[][]);
void display (int m[][]);
int main()
{
int m[][],M,n;
printf("Enter the number for m:");
scanf("%d",&M);
n=M*M;
input(m);
display(m);
return 0;
}
void input (int m[][])
{
int ctr,no;
printf("Enter the %d integers:"n);
for (ctr=1;ctr<=n;ctr++)
{
scanf("%d",m[][]);
}
}
void display (int m[][])
{
int no;
printf("I dont know what im going to do please help");
}
This post has been edited by iwanttobecomeanexpert: 16 October 2009 - 06:02 AM

New Topic/Question
Reply




MultiQuote






|