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

Assignment Help:

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


Related Discussions:- C program for create matrices

Array, how to use nested loop of for in array

how to use nested loop of for in array

OpenGL configured environment, 1. Using Visual C++ and your OpenGL co...

1. Using Visual C++ and your OpenGL configured environment, write an application that displays a “unique” graphical scene that you designed and coded for this course. What yo

Source code, I hv an assignment to do, I almost done. But i cant find whats...

I hv an assignment to do, I almost done. But i cant find whats wrong- my code is to make a simple calculator using function''s all 4 patterns. I did like this- #include int add

Write a constructor for a movie, Suppose we use Lists to represent a movie ...

Suppose we use Lists to represent a movie which has a title, cast and year. For example, the following list represents the movie, "Die Hardly", with the cast "Bruce Willing" and "T

Program with inbuilt functions, write a atm program in c with inbuilt funct...

write a atm program in c with inbuilt functions for 1782?

Decoding the messages, 6999066263304447777077766622337778 -----> message se...

6999066263304447777077766622337778 -----> message sent by the first smuggler. my name is robert---------> message decoded by the second smuggler. Where ‘0’ denotes the "space".

Explain about the variables in c language, Explain about the Variables in c...

Explain about the Variables in c language? The Variable is an identifier that is used to represent some specified kind of information within a designated portion of the program

C program count characters words with space & without space , v\:* {behavio...

v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0

What is the value of a resistor marked as 47kk, (a) Verify the values of th...

(a) Verify the values of the resistors with the following colour coding: (i) red-red-orange-silver (ii) orange-orange-black-blue-green (b) What is the value of a resistor

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd