Q A moving block having mass m, collides with another stationary block having mass 4m .The lighter block comes to rest after collision .When the initial velocity of the lighter block is v, then the value of cofficient of restitution (e) will be.#include stdio.hint main() {float l, b;float P = 2*(l+b);printf("Perimeter=%d", P);}
public static void prints(int i, int n) {
int[][] arr = new int[n][n];
int num = i;
int top = 0, bottom = n - 1, left = 0, right = n - 1;
while (top = bottom && left = right) {
for (int col = left; col = right; col++) {
arr[top][col] = num;
num++;
}
top++;
for (int row = top; row = bottom; row++) {
arr[row][right] = num;
num++;
}
right--;
if (top = bottom) {
for (int col = right; col = left; col--) {
arr[bottom][col] = num;
num++;
}
bottom--;
}
if (left = right) {
for (int row = bottom; row = top; row--) {
arr[row][left] = num;
num++;
}
left++;
}
}
for (int row = 0; row n; row++) {
for (int col = 0; col n; col++) {
System.out.printf("%4d", arr[row][col]);
}
System.out.println();
}
}
INPUT Prints(1,5)class output {
public static void main(String args[])
{
double a, b,c;
a = 3.0/0;
b = 0/4.0;
c=0/0.0;
System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}
class Output{public static void main(String args[]){int arr[] = {1, 2, 3, 4, 5};for ( int i = 0; i arr.length - 2; ++i)System.out.println(arr[i] + " ");}}