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

What is the role of && operator in a program code, What is the role of && o...

What is the role of && operator in a program code? - && is also referred to as AND operator. - When this operator is used, all conditions specified should be TRUE before nex

Program is to define a class as student, Program is to define a class as st...

Program is to define a class as student: Program is to define a class as student and display the records specific depending upon the number class student  {  private:

Program, fine the class bankAccount to implement the basic properties of a ...

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

C++, 2. Write C++ code for calculating the time table

2. Write C++ code for calculating the time table

#padovan string, #padovan string   program in java // aakash , sur...

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

How private instance of a class can be assigned values, Question 1: (a)...

Question 1: (a) Explain clearly the following concepts using suitable examples of your own:- (i) concrete class v/s abstract class (ii) constructor v/s over

Class & objects, how objects are initialized dynamically?

how objects are initialized dynamically?

#title., A student apears in exam of math, physics, and chemistry. Write a...

A student apears in exam of math, physics, and chemistry. Write a program to find the total marks aa student has aqueired find the average.

Multiple constructor, Constructor public class ListNode {    //...

Constructor public class ListNode {    // package access members; List can access these directly private E data; // data for this node privateListNode nextNode; /

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