Write a program to accept a n X n matrix and print addition of diagonal elements of that matrix. INPUT_1:Enter the size of matrix nxn…
Write a java program to display the following patterns. INPUT_1:Enter a number: 5 OUTPUT:************************* INPUT_2:Enter a number: 4 OUTPUT:**************** INPUT_3:Enter a number: 6 OUTPUT:************************************ INPUT_4:Enter…
Write a java program to display the following patterns. INPUT_1:Enter a number: 4 OUTPUT:4 3 2 1 4 3 2 4 3 4 INPUT_2:Enter a…
Declare a protected static variable outside the main and increment the variable inside a function which is called inside the main and the incremented value…
The International Mobile Equipment Identity (IMEI) number is a unique identification or serial number that all mobile phones and smartphones have. It is normally 15…
Java program to convert from decimal to octal. INPUT_1:Enter the Decimal Number: 123 OUTPUT:Octal Number is: 173 INPUT_2:Enter the Decimal Number: 25 OUTPUT:Octal Number is: …
Given a number (n) , the task is to find if its divisible by 11 or not. Input:The first line of input contains an integer…
Write a program to print reverse of a number of the given number. INPUT_1:Enter a number: 1234 OUTPUT:Reversed No: 4321 INPUT_2:Enter a number: 7859 OUTPUT:Reversed…
Write a Java program to declare integer variables, float variable, get input from user and Then display their values on the output INPUT_1:Enter any numbers:…
Java program to check number for prime or not. If the number is Prime print “yes” else print “no” INPUT_1:Enter the Number: 25 OUTPUT:NO INPUT_2:Enter…
Java Program to convert from binary to decimal number INPUT_1:Enter a Binary Number: 1101 OUTPUT:Decimal Number: 13 INPUT_2:Enter a Binary Number: 111 OUTPUT:Decimal Number: 7…
Java Program to Swap two numbers by using division and multiplication. INPUT_1:Enter any two numbers: 3 2 OUTPUT:2 3 INPUT_2:Enter any two numbers: 20 45…
Many people think about their height in feet and inches, even in some countries that primarily use the metric system. Write a program that reads…
Write a java program to print concatenated strings . You can + operator to concatenate strings and print it. INPUT_1:Enter the Strings: I am Fine…
Write a program that asks the user’s name, and then greets the user by name. Before outputting the user’s name, convert it to upper case…
You’re given an integer N. Write a program to calculate the sum of all the digits of N. InputThe input integer NOutputCalculate the sum of…
Write a program that prompts the user to enter the length from the center of a pentagon to a vertex and computes the area of…
Write a Java program to allow the user to input his/her age. Then the program will show if the person is eligible to vote. A…
Write a program that prompts the user to enter two points (x1, y1) and (x2, y2) and displays their distance between them. Use Double Data…
fgrep The fgrep command is similar to grep, but with three main differences: You can use it to search for several targets at once, it…