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
Conversion from Basic to User-Defined variable Consider the following example. class Distance                  {                   public  :

C Program for FUNCTION OF DIVIDER int gcd(int , int); void main() {           int m=0,n=0,k=0;           clrscr();           printf("ENTER THE FIRST DIGIT: ");

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

The probabilistic Hough transform uses random sampling instead of an accumulator array. In this approach the number of random samples r, is not specified in the OpenCV call, but is

Money is immutable and is associated with a currency. When two money entities are added or subtracted be sure to consider currency conversion. You must create a money object result

In this project, you will write a software for the Registrar's office of a university called YouOIT to maintain information about students and courses at the university. The reg

Where are longjmp and setjmp used in C++? -Setjmp and longjmp must not be used in C++. - Longjmp jumps out of the function without unwinding stack. This means that local obj

#padovan string in java   program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class PadovanStrin

Need help finishing my homework. It''s been 5 years since I''ve use C++. I am a VN.Net programmer. -Todd

Project Description: 1) Develop banking software 2) Payment Gateway System There is some other system available for development. I'm willing to show long-term opportunity