+ 2

If n is considered as n.n matrix and for the n*n matrix we should find the addition of n th number

Eg. If n =3 Then matrix will be 123 456 789 And the addition will be like E=3+6+9 Write a code for this concept

11th Jan 2018, 9:17 AM
sanket
5 Answers
+ 20
import java.util.*; public class Program{ public static void main(String[] args){ int n=new Scanner(System.in).nextInt(); System.out.print(n*n*(n+1)/2);} } //here is the code , !(the answer) //hope it helped now â˜ș
11th Jan 2018, 10:01 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
If it is 3*3 It is not that u have to sum last number It depends on the n
11th Jan 2018, 9:41 AM
sanket
+ 1
Can you please send me the ans Of codechef. Com/jan18/problems /maxsc
11th Jan 2018, 9:54 AM
sanket
+ 1
C++
11th Jan 2018, 10:44 AM
sanket
+ 1
Code in c++
12th Jan 2018, 1:40 PM
sanket