What is the output
Q: All input and output is dealt with in the form of__________________
A: All input and output is dealt with in the form of I/O devices.
Q: What is output of A = [1 0 2]; b = [30 7]; c=a.*b ?
A: Answer:
Q: Input (x1,x2,x3) 1 (0, 1, 1) 1 (1,0, 1) 1 (1, 1, 0) All other
A:
Q: Create a Matlab program that reads the value of an integer n and outputs the absolute difference…
A: abs is the function used to find the absolute difference
Q: What is the output if the input is 12 4? a. What is the output if the input is 3 27? What is the…
A: To check the output with the given input, do dry run . Dry run is the best method to observe what's…
Q: Using the program shown below, explain what the output will be at lines X and Y.
A: pid=fork() will create a new child process and pass value 0 to child process and a positive value to…
Q: what is wrong with my codes
A: There is nothing wrong with syntax but there is an error in logic
Q: a[2][1
A: A string array is set of characters in C and C plus plus languages. We can declare it and can be…
Q: 29. What is the output of print 0.1 + 0.2 == 0.3? a. True b. False c. Machine dependent d. Error
A: The complete answer is given below.
Q: m 0 0 10 20 Output
A: Answer is provied below.
Q: What
A: The term “output” is association with computers is data or information provided to the individual…
Q: 2 Thermocouple takes input as temperature and gives a small E.M.F as output Select one: True False
A: Thermocouple is defined as a closed circuit which is formed of two dissimilar metallic conductors…
Q: Write MATLAB program to take input height and radius of a cylinder from user and print the volume in…
A: Algorithm : Step 1 : ask for the radius of cylinder from user. Step 2 : ask for the height of…
Q: (Write screen output, when fun is called in main function with n=10, a=5 and b=7.)
A: Please find the answer below
Q: One and One Now let’s start with something simple! Make a program that accepts a single character…
A: In the following, the first line contains the inputted character, the second line contains an…
Q: Programmed __________________ Output is Better known as _______________.
A: Given question is related to programming
Q: '''The expected input and output are given (see right side) but my output and my code (on the left)…
A: The output mismatch is because of the first line that is getting printed in same line But it has to…
Q: 1. One and One by CodeChum Admin Now let's start with something simple! Make a program that accepts…
A: In this program we have to take two user inputs one for character value - character means a single…
Q: 2- What are the functions of an accumulator?
A: An accumulator is a special category of computer register that helps in the proper execution of…
Q: Run this two program and provide the output.
A: Swing is still used heavily.
Q: write simply t
A: Given code: #include <iostream.h> int main (){ cout<<"Hello World"; return 0;}…
Q: Other name of PIO is _______________ Input/Output.
A: Given question wants other name of PIO.
Q: problem's Input will answer the question, "What information will the computer need to know in order…
A: Here have to determine about input use in programming.
Q: Define output statement.
A: Output statement: An output statement is a portion of a computer program that tells the computer…
Q: Determine what is wrong with my code, the general output only display; Resistor Computation Enter…
A: Hello Student Greetings Hope you are doing great. I will try my best to answer your question Thank…
Q: This code is incorrect. It does not match the output pictured in the original question. Please…
A: Task : Given the code and the output. The task is to find the output as per the given picture.
Q: If the input is f, what is the value displayed?
A: If the input is f, what is the value displayed?
Q: The output is Enter Lower Limit : 0 Enter Upper Limit : 10
A: I have not the exactly same code for this pattern but for this similar number pattern I've something…
Q: 2. When a car runs on a highway, its speed should be in 45-65 mph. Using the keyboard input the…
A: Since you are not mentioning the programming language, here we are using C++ to complete the…
Q: in . .when input change, it doesn't affect the output
A: Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: 1) What is the output if the input is 1, 2,3 ?:
A: Note: As per bartleby guideline if there are multiple MCQ then we are asked to answer first 3 only…
Q: Please do it with Python(Exact output)
A: Python(Exact output)
Q: Input The first line of the input contains a single integer T denoting the number of test cases. The…
A: Here is the C++ code as required I have kept it very simple to understand
Q: Input: 8 8 is in the series so the output will be Output: YES Input The input will be a single-line…
A: Step-1: StartStep-2: Declare a variable num and take input from userStep-3: Call function…
Q: Type you program in the table below to come up with the desired output using C or C++
A: Write the program in C/C++ to get the output as shown in the given image. I have used C++…
Q: 1. What is the sample frequency? 2. How will the sound change if you make the sample frequency…
A: 1. Since there are 73113 samples for 10 second starting from 0 to 9, hence Sample frequency is…
Q: What is the Output?
A: Given: #include <iostream> using namespace std; int main(){ int n[4]={10,20,30,40};…
Q: Write a program for the following input and output. Input Input rows: 5 Output
A: According to the Question below the Solution: Programming language is not mention so i am using…
Q: Frequency Division __________________ Access is Better known as _______________.
A: This fill in the blank question is asking for frequency access in computer science.
Q: what is invalid input ?
A: Before performing a test, you need to decide what data you are going to include in your test case.…
Q: X Testing with input: 20 Output differs. See highlights below. Special character legend Your output…
A: The given lines of code are to be written in Python. User inputs a float number and a while loop to…
Q: Write a program in kotlin to find which character are type of numeric and print these characters in…
A: Required:- Write a program in kotlin to find which characters are a type of numeric and print these…
Q: Write a program that displays your name and age on the screen, age must be stored in some integer.
A: EXPLANATION - In this program firstly declare character array variable named with name it will…
Q: Q1/ For the computer programs shown below, write the outputs in the screen. (with comment). (i)…
A: i) lets Read B = 5 Assign Value of X,Y and B in Z1 Z1 = ASIN((2*X+Y)/20)+SQRT(B**2-X**2) Z1 =…
Q: Explain and describe the possible output. 1. int x= 30; int y= 15; { iflx > 20){ ifly > 20) {…
A: The if-else construct is used for implementing two-way decision making. If the relational expression…
Q: Instructions 1. Input one character and one integer. Make sure that they are typed on different…
A: Step 1:- Note:-I am solving this problem in C++ programming langauage Program Approach:- 1.Declare…
Q: Write code to check if the variable, value, is either 2, 5, 8 or 10. If so, output the value…
A: Given: Write code to check if the variable, value, is either 2, 5, 8 or 10. If so, output the value…
Step by step
Solved in 2 steps with 1 images
- public class ShoppingListDriver{ public static void main(String[] args){ ShoppingList sl=new ShoppingList(3);sl.insert(null);sl.insert(new Item("Bread", "Carb Food", 2, 2.99));sl.insert(new Item("Seafood","Sea Food", -1, 10.99));sl.insert(new Item("Rice", "Carb Food",2, 19.99));sl.insert(new Item("Salad Dressings","Dessing", 2, 19.99));sl.insert(new Item("Eggs", "Protein",2, 3.99));sl.insert(new Item("Cheese","Protein", 2, 1.59));sl.insert(new Item("Eggs", "Protein",3, 3.99));sl.printNames();sl.print(); System.out.println("After removing Eggs:");sl.remove(new Item("Eggs","Protein",0,0));sl.printNames();sl.print(); }}Here is my code in Java: import java.util.Scanner; import java.util.HashMap; public class Inventory { /** This class demonstrates the inventory */ //Declarations Of inventory static final int LightBulb60W = 1; static final int LightBulb100W = 2; static final int BoltM5 = 3; static final int BoltM8 = 4; static final int Hose25 = 5; static final int Hose50 = 6; public static void main (String [] args) { //Scanner Object @SuppressWarnings("resource") Scanner keyboard = new Scanner(System.in); //Variables int month; int day; int year; double units; double cost = 0; //Declarations int total; HashMap<Integer, String> productMap = new HashMap<>(); productMap.put(1,"Light Bulb 60W"); productMap.put(2,"Light Bulb 100W"); productMap.put(3,"Bolt M5"); productMap.put(4,"Bolt M8"); productMap.put(5,"Hose 25 feet"); productMap.put(6,"Hose 50 feet 60W"); while(true){ //Prints out inventory System.out.println("The Inventory: "); System.out.println("1…Write a client program that loops around getting two fractions from the user,output their sum, and state whether or not they are equal. Keep looping until the first fraction entered is a zero fraction. import java.util.ArrayList;import java.util.Scanner; //Define the class Fractionclass Fraction{private int n, d;public Fraction(){//Initialize the valuesthis.n = this.d = 0;}public Fraction(int n, int d){//Initialize the variablesthis.n = n;this.d = d;}//Define the getter function getNum() that returns the numeratorpublic int getNum(){//Returns numeratorreturn n;}//Define the getter function getDen() that returns the denominatorpublic int getDen(){//Returns denominatorreturn d;}//Define the boolean function isZero() that returns 0 if numerator is 0 and denominator is not equals to zeropublic boolean isZero(){return(getNum() == 0 && getDen() != 0);}public boolean isequals(Object c){Fraction f = (Fraction) c;return(Integer.compare(n,f.n))==0 &&…
- 1 IN JAVA ----- Write a method of public class called "isInputOneValid" that verifies if a string parameter called "inputOne" is included inside an array called "tableOne". Return as a boolean (if valid, return true, if not, false)public class RepeatStrings {public static void main(String[] argv) throws Exception{final int SIZE = 3;Scanner keyboard = new Scanner(System.in);QueueADT<String> stringQueue;//stringQueue = new CircularArrayQueue<String>(SIZE);stringQueue = new LinkedQueue<String>();StackADT<String> stringStack;stringStack = new ArrayStack<String>(SIZE);String line;for (int i = 0; i < SIZE; i++){System.out.print("Enter a line of text which includes only 3 words > ");line = keyboard.nextLine();//TODO enque the new element//TODO push the new element}System.out.println("\nOrder is: ");for (int i = 0; i < SIZE; i++){// TODO Remove an element in the order in which we input strings// Save it to the String variable, named lineSystem.out.println(line);}System.out.println("\nOpposite order is: ");for (int i = 0; i < SIZE; i++){// TODO Remove an element in the order opposite to they were entered// Save it to the String variable, named lineSystem.out.println(line);}}}public class FindArrayDifference { static void arrayDifference(int a[], int b[]) { int k = 0; int [] c = new int[a.length]; for(int i=0; i < a.length; i++) { int j; for(j = 0; j < b.length; j++) if(a[i] == b[j]) break; if(j == b.length) c[k++] = a[i]; } for(int j = 0; j < k; j++) System.out.println(c[j]); } public static void main(String[] args) { int a[] = {1,2,3,7,8,15,26}; int b[] = {1,2,3,15,4,8,6}; arrayDifference(a,b); } } Calculate the algorithm step number and algorithm time complexity of the above program?
- In Java import java.util.Scanner; public class ShoppingList { public static void main (String[] args) { Scanner scnr = new Scanner(System.in); ItemNode headNode; // Create intNode objects ItemNode currNode; ItemNode lastNode; String item; int i; // Front of nodes list headNode = new ItemNode(); lastNode = headNode; int input = scnr.nextInt(); for(i = 0; i < input; i++ ){ item = scnr.next(); currNode = new ItemNode(item); lastNode.insertAtEnd(headNode, currNode); lastNode = currNode; } // Print linked list currNode = headNode.getNext(); while (currNode != null) { currNode.printNodeData(); currNode = currNode.getNext(); } } } ----------------------------------------- public class ItemNode { private String item; private ItemNode nextNodeRef; // Reference to the next node public ItemNode() { item = ""; nextNodeRef = null; } // Constructor public ItemNode(String itemInit) { this.item = itemInit; this.nextNodeRef = null; } // Constructor public…public class A{private int var1;public int f1() {...}public int f1(int n1) {...}public int f2(int n1) {...}};public class B extends A{private int var2;public int f1(int n1) {...}public int f3() {...}}; -------------------------------- public class Tester{public static void main(String [] args){A a = new A();B b = new B();int num1 = b.f1(); //Statement 1int num2 = b.f2(22); //Statement 2int num3 = b.var2; //Statement 3a = new B(); //Statement 4}} ------------------------------------------------- Explain how a call in object b could possibly affect the value of A::var1.import java.util.Scanner; class InventoryNode { private String item; private int numberOfItems; private InventoryNode nextNodeRef; // Reference to the next node public InventoryNode() { item = ""; numberOfItems = 0; nextNodeRef = null; } public InventoryNode(String itemInit, int numberOfItemsInit) { this.item = itemInit; this.numberOfItems = numberOfItemsInit; this.nextNodeRef = null; } public InventoryNode(String itemInit, int numberOfItemsInit, InventoryNode nextLoc) { this.item = itemInit; this.numberOfItems = numberOfItemsInit; this.nextNodeRef = nextLoc; } // Getter for item public String getItem() { return item; } // Getter for numberOfItems public int getNumberOfItems() { return numberOfItems; } // Getter for nextNodeRef public InventoryNode getNext() { return this.nextNodeRef; } // Setter for nextNodeRef public void…
- Please determine errors and correct it. package test; import java.util.Scanner; public class Test { public static void main(String[] args) {String fname,lname; int hrsworked; Double payrate,income,fnfp,paye,fiji,medical=6.50,total_deduction,netpay; Scanner sc = new Scanner(System.in); System.out.print("\nEnter Employee First Name: "); fname = sc.nextLine(); System.out.print("Enter Employee Last Name: "); lname = sc.nextLine(); System.out.println("Enter Employee Hours Worked: "); hrsworked = sc.nextInt(); System.out.print("Enter Employee Pay Rate: "); payrate = sc.nextDouble(); income = hrsworked * payrate; fnfp = income*0.085; paye = income*0.065; fiji = income*0.0285; total_deduction = hrsworked + fnfp + paye + fiji +medical; netpay = income-total_deduction; System.out.printf("\n*-------------* Pay Slip for: %s *-------------*\n",(fname+" "+lname)); System.out.printf("Fortnightly Income: $ %.2f\n",income); System.out.printf("Hours Worked: \n", hrsworked); System.out.printf("FNPF: $…Define a class Car as follows:class Car { public String make; public String model; public int mpg;// Miles per gallon}a) Implement a comparator called CompareCarsByMakeThenModel that can be passed as an argument to the quicksort method from the lecture notes. CompareCarsByMakeThenModel should return a value that will cause quicksort to sort an array of cars in ascending order (from smallest to largest) by make and, when two cars have the same make, in ascending order by model.b) Implement a comparator called CompareCarsByDescendingMPG that can be passed as an argument to the quicksort method from the lecture notes. CompareCarsByDescendingMPG should return a value that will cause quicksort to sort an array of cars in descending order (from largest to smallest) by mpg.c) Implement a comparator called CompareCarsByMakeThenDescendingMPG that can be passed as an argument to the quicksort method from the lecture notes.…import java.util.ArrayList; public class Bus { privateStringname; privateintsize; privateintbasePrice; privateArrayList<Trip>approvedTrips; privateintlevel;// 1,2,3 for low,medium, high repectively; privateintid; privatestaticintnextId=0; privateMinistrymny; protectedStringtripTypes; privateintgetNextId(){ returnnextId++; } publicBus(){ approvedTrips=newArrayList<Trip>(); } publicBus(Stringname,intsize,intbasePrice,intlev,Ministrymny){ approvedTrips=newArrayList<Trip>(); this.name=name; this.size=size; this.basePrice=basePrice; this.level=lev; this.id=getNextId(); this.mny=mny; tripTypes="BASICTRANSPORT"; } publicbooleanavailable(Datedate){ booleanretval=true; for(Tript:approvedTrips) if(t.getDate().getDay()==date.getDay()) retval=false; returnretval; } publicintgetBasePrice(){ returnbasePrice; } publicintgetId(){ returnid; } publicStringgetName(){ returnname; } publicdoublegetSize(){ returnsize; } publicStringtoString(){ returnname; }…