Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (anonymous):

Write a program thats asks the user to enter the numbers from 1 to 16 and then display the numbers in a 4 by 4 arrangement, followed by the sum of the rows, columns and diagonals

OpenStudy (anonymous):

Any specific language?

OpenStudy (anonymous):

it is c

OpenStudy (anonymous):

#include <stdio.h> #include <stdlib.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { int num1, num2, num3, num4, num5, num6, num7, num8, num9, num10, num11, num12, num13, num14, num15, num16,row1; Printf(" Enter num from 1 to 16:"); scanf("%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d;",&num1,&num2,&num3,&num4,&num5,&num6,&num7,&num9,&num10,&num11,&num12,&num13,&num14,&num15,&num16); printf("%d,%d,%d,%d", &num1,&num2,&num3,&num4); printf("%d,%d,%d,%d",&num5,&num6,&num7,&num8); printf("%d,%d,%d,%d",&num9,&num10,&num11,&num12); printf("%d,%d,%d,%d",&num13,&num14,&num15,&num16); row1=num1+num2+num3+num4; Printf("Row sums: %d,&d,&d,&d\n",row1); return 0; }

OpenStudy (anonymous):

this is what i have so far

OpenStudy (anonymous):

any help?

OpenStudy (anonymous):

Sorry, I don't know C.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!