+ 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
5 ответов
+ 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 ☺
+ 1
If it is 3*3
It is not that u have to sum last number
It depends on the n
+ 1
Can you please send me the ans
Of codechef. Com/jan18/problems /maxsc
+ 1
C++
+ 1
Code in c++