Answer:
ranforce = randi([0, 12]);
if (ranforce == 0)
disp('There is no wind')
else if(ranforce>0 && ranforce <7)
disp('There is a breeze')
else if(ranforce>6 && ranforce <10)
disp('This is a gale')
else if(ranforce>9 && ranforce <12)
disp('It is a storm')
else if(ranforce==12)
disp('Hello, Hurricane!')
end
Explanation:
<em>Replace all switch case statements with if and else if statements.</em>
<em>An instance is:</em>
<em>case {7,8,9}</em>
<em>is replaced with</em>
<em>else if(ranforce>9 && ranforce <12)</em>
<em>All other disp statements remain unchanged</em>
The German mathematician & physicist ”Carl Friedrich Gauss”
Born: April 30, 1777, Brunswick, Germany
Died: February 23, 1855, Göttingen, Germany
A spacecraft virus<span> is a type of bacteria virus that feeds on other bacteria. It got it name because it is mostly shaped like a spacecraft.</span>
Here you go,
import java.util.Scanner;
import java.util.Random;
public class OrderCalculator{
public static void main(String[] args){
float x, y, z, semi, area;
Scanner in = new Scanner(System.in);
System.out.print("Enter the 3 sides: ");
x = in.nextFloat();
y = in.nextFloat();
z = in.nextFloat();
semi = (float) ((x + y + z) / 2.0);
area = (float) Math.sqrt(semi * (semi - x) * (semi - y) * (semi - z));
System.out.printf("The area is: %.3f\n", area);
}
}