Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
702 views
in C Programming by (234 points)
Write a c code to check if a matrix is diagonally dominant or not. Check
the following figure for the definition of diagonally dominant matrix.

Please log in or register to answer this question.

1 Answer

0 votes
by (30.5k points)

In this tutorial we will learn how to calculate area of Square. Following are the two ways to do it:

1) Program 1: Prompting user for entering the side of the square

2) Program 2: Side of the square is specified in the program’ s source code.

Program 1:

/**

* @author: BeginnersBook.com

* @description: Program to Calculate Area of square.Program

* will prompt user for entering the side of the square.

*/

import java.util.Scanner;

class SquareAreaDemo {

public static void main (String[] args)

{

System.out.println("Enter Side of Square:");

//Capture the user's input

Scanner scanner = new Scanner(System.in);

//Storing the captured value in a variable

double side = scanner.nextDouble();

//Area of Square = side*side

double area = side*side;

System.out.println("Area of Square is: "+area);

}

}

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...