C program for create matrices , C/C++ Programming

C Program for CREATE MATRICES

#include stdio.h>

#include conio.h>

void main()

{

          int a[10][10],rw=0,clm=0,i=0,j=0;

          char s=' ';

          clrscr();

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

          {

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

                   {

                             a[i][j]=0;

                   }

          }

i=0;    j=0;

          printf("\nENTER THE LIMIT OF ROWS: ");

          scanf("%d",&rw);

          printf("\nENTER THE LIMIT OF COLS: ");

          scanf("%d",&clm);

          for(i=0;i

          {

                   for(j=0;j

                   {

                             printf("\nENTER THE ELEMENT: ");

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

                   }

          }

          for(i=0;i

          {

                   for(j=0;j

                   {

                             if(a[i][j]==0)

                             {

                                      a[i][j]='-';

                                      printf("%c ",a[i][j]);

                             }

                             else

                             {

                                       printf("%d ",a[i][j]);

                             }

 

                   }

                   printf("\n");

          }

          getch();

}

OUTPUT :

ENTER THE LIMIT OF ROWS : 2

ENTER THE LIMIT OF COLS :  2

 

ENTER THE ELEMENT 1

ENTER THE ELEMENT 2

ENTER THE ELEMENT 3

ENTER THE ELEMENT 4

1  2

3  4

Posted Date: 9/10/2012 7:40:40 AM | Location : United States







Related Discussions:- C program for create matrices , Assignment Help, Ask Question on C program for create matrices , Get Answer, Expert's Help, C program for create matrices Discussions

Write discussion on C program for create matrices
Your posts are moderated
Related Questions
To store a date use a structure that contains three members date, month and year. If the dates are equal then display message “Equal” otherwise “Unequal” Program structure: main()



payment system, in c++ only..just use the printf or scanf.please

There are ''n'' ants on a ''n+1'' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are moving eith

main() { int a[5]={1,3,6,7,0}; int *b; b=&a[2]; } The value of b[-1] is

Aim: To implement a program for following string operations: Length of String. String Concatenation. Substring (provide start index and length) Find character a

Project Description: I want someone to create and install a keylogger on a chrome browser. This could be a relatively simple job, please have experience with this type of work.

fine the class bankAccount to implement the basic properties of a bank account. An object of this class should store the following data: Account holder''s name (string), account nu

salotion of programes