Organize data within a document..draw any shape you wants within a document... easily create manipulate shapes within a document. hope this helps
Answer:
- import java.util.Scanner;
- public class Main {
-
- public static void main(String[] args) {
-
- Scanner input = new Scanner(System.in);
- System.out.print("Please enter two characters: ");
- String inputStr = input.nextLine();
-
- if(inputStr.charAt(0) == 'B' || inputStr.charAt(0) == 'b'){
- System.out.println("Biology");
- }
- else if(inputStr.charAt(0) == 'C' || inputStr.charAt(0)== 'c'){
- System.out.println("Computer Science");
- }
- else if(inputStr.charAt(0) == 'I' || inputStr.charAt(0) == 'i')
- {
- System.out.println("Information Technology and Systems");
- }
- else{
- System.out.println("Invalid major");
- }
-
- int num = Character.getNumericValue(inputStr.charAt(1));
-
- if(num >= 1 && num <= 4){
- switch (num){
- case 1:
- System.out.println("freshman");
- break;
- case 2:
- System.out.println("sophomore");
- break;
- case 3:
- System.out.println("junior");
- break;
- case 4:
- System.out.println("senior");
- break;
- }
-
- }
- else{
- System.out.println("Invalid year status");
- }
-
- }
-
- }
Explanation:
The code consists of two main parts. The part 1 is to validate the input major and print out the major according to the input character (Line 10 -22). If the input character is not matched with the target letters, a message invalid major will be displayed.
The part 2 is to validate the year status to make sure it only fall within the range of 1-4 (Line 26 -45). If within the range, the program will display the year major accordingly. If not a message invalid year status will be displayed.
Answer:
see explaination
Explanation:
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
double temp1,temp2,inc,cel;
int i=1;
while(i==1)
{
i=0;
cin>>temp1>>temp2>>inc;
if(temp2<temp1||inc<=0)
{
i=1;
cout<<"Starting temperature must be <= ending temperature and increment must be >0.0\n";
}
}
cout<<endl;
cout<<setw(15)<<"Fahrenheit"<<setw(15)<<"Celsius";
while(temp1<=temp2)
{
cel=(temp1-32)/1.8;
cout<<endl;
cout<<fixed<<setprecision(3)<<setw(15)<<temp1<<setw(15)<<cel;
temp1+=inc;
}
}
Please kindly check attachment for output.
Answer:
The "A" option is correct.
Explanation:
For CSS flexbox layout, the property "align-content" requires that the space in the flexbox is more than enough to show the items. In this case, to distribute evenly the items and show the first and last items aligned with the start and end of the main axis, the only suitable option is "space-between". This option leaves no space at the start or at the end of the flexbox, distributing the remaining space between the elements into the flexbox.