Tuesday, 26 December 2017

Learn C language Part 18 Two Dimenstional Array in C, MATRICES IN C

\



#include <stdio.h>

#include <conio.h>





main()

{

 textcolor(RED);

int  i,j;

int x[3][3];



for(i=0;i<3;i++)

{





for(j=0;j<3;j++)

{



printf("Enter the number that you want to save on position x[%d,%d] : ",i,j);

scanf("%d",&x[i][j]);



} //inner loop









} //outer loop





printf("\n\n\n");

//printing the matrices .........................................

printf("Matrices A\n");



for(i=0;i<3;i++)

{

printf("|\t");



for(j=0;j<3;j++)

{



printf("%d\t",x[i][j]);



} //inner loop

printf("|");



printf("\n\n");





} //outer loop





}

No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...