Answer:
Answer for the question is given in the attachment .
Explanation:
Answer:
see explaination
Explanation:
import java.util.InputMismatchException;
import java.util.Scanner;
public class calculate {
static float a=0,b=0;
double cal()
{
if(a==0||b==0)
{
System.out.println("no values found in a or b");
start();
}
double x=(a*a)+(b*b);
double h=Math.sqrt(x);
a=0;
b=0;
return h;
}
float enter()
{
float val=0;
try
{
System.out.println("Enter side");
Scanner sc1 = new Scanner(System.in);
val = sc1.nextFloat();
return val;
}
catch(InputMismatchException e)
{
System.out.println("Enter correct value");
}
return val;
}
void start()
{
calculate c=new calculate();
while(true)
{
System.out.println("Enter Command");
Scanner sc = new Scanner(System.in);
String input = sc.nextLine();
switch(input)
{
case "A":
a=c.enter();
break;
case "B":
b=c.enter();
break;
case "C":
double res=c.cal();
System.out.println("Hypotenuse is : "+res);
break;
case "Q":
System.exit(0);
default:System.out.println("wrong command");
}
}
}
public static void main(String[] args) {
calculate c=new calculate();
c.start();
}
}
Answer:
Explanation:
% Clears variables and screen
clear; clc
% Asks user for input
n = input('Total number of objects: ');
r = input('Size of subgroup: ');
% Computes and displays permutation according to basic formulas
p = 1;
for i = n - r + 1 : n
p = p*i;
end
str1 = [num2str(p) ' permutations'];
disp(str1)
% Computes and displays combinations according to basic formulas
str2 = [num2str(p/factorial(r)) ' combinations'];
disp(str2)
=================================================================================
Example: check
How many permutations and combinations can be made of the 15 alphabets, taking four at a time?
The answer is:
32760 permutations
1365 combinations
==================================================================================
Answer:
Yes, fracture will occur
Explanation:
Half length of internal crack will be 4mm/2=2mm=0.002m
To find the dimensionless parameter, we use critical stress crack propagation equation
and making Y the subject

Where Y is the dimensionless parameter, a is half length of crack, K is plane strain fracture toughness,
is critical stress required for initiating crack propagation. Substituting the figures given in question we obtain

When the maximum internal crack length is 6mm, half the length of internal crack is 6mm/2=3mm=0.003m
and making K the subject
and substituting 260 MPa for
while a is taken as 0.003m and Y is already known

Therefore, fracture toughness at critical stress when maximum internal crack is 6mm is 42.455 Mpa and since it’s greater than 40 Mpa, fracture occurs to the material
Answer:
51.4 Ohms
Explanation:
By applying voltage division rule
where v is voltage, subscripts i and f represnt initial and final, R is resistance, m is internal and l is external.Substituting 7V for final voltage, 10V for initial voltage and the external resistance as 120 Ohms then
