Hey There!
To create a new folder, press <span>Ctrl+Shift+N</span><span>
</span>
Answer:
#include <iostream>
using namespace std;
void matrix(){
int row = 5, col = 6;
int myarr[row][col];
for (int i = 0; i < 5; i++){
for (int x = 0; x < 6; x++){
if (i == 0){
myarr[i][x] = (x+1)*(x+1);
}else if ( x == 0){
myarr[i][x] = (i+1)*(i+1)*(i+1);
} else if ( i == x){
myarr[i][x] = (i+1);
} else{
myarr[i][x] = myarr[i-1][x] + myarr[i][x-1];
}
}
}
for (int i = 0; i < 5; i++){
for (int x = 0; x < 6; x++){
cout<< myarr[i][x] << " ";
}
cout<< "\n";
}
}
int main(){
matrix();
}
Explanation:
The C++ source code defines a two-dimensional array that has a fixed row and column length. The array is a local variable of the function "matrix" and the void function is called in the main program to output the items of the array.
Answer:
below is a Shell I have ;
1.Import java.nio.file.*;
2.Import java.nio.file attribute.*;
3.Import java.10 Exception;
4.public class FileStatistics
5.{
6.public static void main(string []args)
7.{
8.path file=
9.
paths.get("C:\\Java\\chapter.13\\TestData.txt")
10.try
11.{
12.\\declare count and then display path, file, name and folder name.
13.
14.
15.
16.\\declare a BasicFileAttributes object, then add statements to display the file's size and creation time.
17.
18.}
19.
20.catch (10 Exception e)
21.{
22.\\add display 10 Exception
23.
24.}
25.}
Answer:
javac Welcome.java
Explanation:
In order to the file to compile with the default compiler in the JDK, the instruction must be of the form:
javac filename
(Note: the filename with the .java extension)