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
Create a C language code, only one program, to implement the following task. Task: Write C code for a program that implements a digital clock (HH:MM:SS). The clock inclu

Project Description: We want an EXPERT CODER to help us create an 'audio engine' in C#. We want to be able to specify an input of a wave/MP3 file, and have the engine manipul

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

how i can open a file

What are control structures? - Control structures decide which instructions in program must be executed. - This implies that program flow may not necessarily move from one s

Semaphore is used to synchronize processes. whereas mutex is used to give synchronization among threads running in the similar process.

Rules of Inheritance: Private members are not inherited; the members can be accessed only within its class. It cannot be used through the object. Protected members are

HWID Spoofer for Windows 7, 8 x64 Project Description: I want a simple program that will spoof my hardware id. I should be able to prepare the id to spoof to in the program a

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

write a c++ program for minimum shelf downloads