12- For the following script, if n=4 then the result is 24. * #include using namespace std;
Q: -ts) Using Matlab commands, write a program to draw a red triangle with its corners' coordinates…
A: Introduction: For creating the triangle we need to have the coordinate of a,b,c point where we can…
Q: i = 5 while i : print (?, end=',') i=i-1
A: If You Want to Print Numbers in Decreasing Order please use i in place of ? Corrected Code is…
Q: A šet of current readings is stored in memory locations starting at XX50H. The end of the data…
A: explanation with code: Figure:
Q: 1- Suppose you have the fallowing code segment convert it to suitable excel formula, note : Suppose…
A: This formula is about multiply the column A and B and put it on C and the add every element of C.
Q: 1 % This script computes the area of several geometric 2 % figures. The user is presented with a…
A: Given: We have to Modified the MATLAB code to find Geometric figure of cylinder, circle,…
Q: (True/False): A function ending with the letter W (such as WriteConsoleW) is designed to work with a…
A: Introduction: Unicode is a standard that specifies all the characters required to write most live…
Q: : Inputs: number The user inputted number between 0 and <4000. : Out put: roman numeral The string…
A: According to the information given:- We have to print the roman number from user input positive…
Q: Write an awk script to find the gender of the oldest person with a GPA higher than 3.0.
A: awk BEGIN { gender="none"; age=0; FS="," }NR>1 && $2 > 3 && age < $3 {…
Q: © ৭:r * For the following script, if n=4 then the result is 24 -12 #include using namespace std;…
A: Correct Answer False is the correct option Explanation:- This is false because n was not declared in…
Q: Write a script program for File -- m script. That script should prompt the user to give a…
A: Solution: Given, That script should prompt the user to give a input number between 50 to 100.…
Q: (True/False): A function ending with the letter W (such as WriteConsoleW) is designed towork with a…
A: Explanation: There are two different types of Win32 functions are used to work with text. They are…
Q: Choose the correct answer int a = 11, b = 22, c = 33, d=103; %3D d = d - ((a * a +b - c) + (C - a) *…
A: In the above program code syntax error is occured. This is because, syntax errors are errors where…
Q: cenin Ame da ce The Translation Look aside Ber TL addreses can be tranlated wito wy TLA the address…
A: The answer is here
Q: I need help with this problem I attatched the sample output Exempt You will be writing a program to…
A: Program plan:Display the welcome statementGet the average value from the user and check the average…
Q: 1. Write the JSF code to display the below output shown in "Figure-A":…
A: created one html and one php file that is below.
Q: 8. Convert the following NFA to a DFA. Please do this by hand, and do not use JFLAP for the…
A: Initial state of DFA=€closure(initial state of NFA) Any state which contains final state of NFA as…
Q: If y, = sin(x),y2 = cos(x), y3 = tan(x), where -n<x <n, write a MATLAB script to plot Y1, Y2 and yz…
A: The Matlab code for plotting sin(x), cos(x) and tan(x) have been shown in step 2 with the output.
Q: Write a Python program to generate a One Time Password (OTP)
A: Given Program:- Write a Python program to generate a One Time Password (OTP)
Q: You need to upload a Python script file that correctly executes the following three steps: 1.Enter…
A: Required: You need to upload a Python script file that correctly executes the following three steps:…
Q: B. Provide the escape sequences which can be used with a string to accomplish each of the following…
A: Escape sequence is use to identify and display specific format or specific character to formatting…
Q: a. continues appears 2. b. Informatio. C. starting or 3. d. continues ta 4. e. activity witH f.…
A: Answer: Following is the marching 1 -> a 2 -> e 3 -> g 4 -> b 5 -> f 6 -> e 7…
Q: Fill in the blank question: Q. ECP is also known as _______________ Port.
A: Answer : EPP/ECP (Enhanced Parallel Port/Enhanced Capability Port) is a standard signaling method…
Q: A(n) ____________, a(n)___________, a(n) or a(n) value used to signify “end of data entry”.
A: A sentinel value, also known as a signal value, a dummy value, or a flag value, is used to indicate…
Q: 5. All keywords in Python are in a. lower case b. UPPER CASE c. Capitalized d. None of the mentioned
A: A keyword is the special word within a program that has a particular meaning. They cannot be used as…
Q: b) Provide the source from where RFCS can be accessed. c) Provide a brief summary of the following…
A: RFC :- An Internet Standard is as thoroughly tested specification that is useful to and adhered to…
Q: Computer Science By using Python programming write a function to import an XML file. errors may…
A: Computer Science By using Python programming write a function to import an XML file. errors may…
Q: Course: Cse 460 A-9 Complete the following problem using python3language. Please paste the codes…
A: QUESTION: Sort a DOUBLY linked sequential list using the insertion sort algorithm.
Q: Only C programing Language Attention : Your answer file name will be your school number-Q1.cpp (ex:…
A: Note: This code should be rewritten instead of copying to the compiler otherwise it will throw a…
Q: 4.10 (Python Please) (Guess the capitals) Rewrite Exercise 11.40 using a dictionary to store the…
A: I created the program with dictionary and perform the code for approx 7-8 states its working…
Q: Computer Science iostream reduces all errors to one of four states, such as eof(), list other three
A: There are four states. [good, bad, eof, fail] 1. good in.good() will return true if every thing…
Q: Select one: a. None of the option. b. Provides communication to the user. c. Is unnecessary. d.…
A: Please find the answer below
Q: 10 DIM A (3.3) 20 FORI= 1 TO 3 30 FOR J= 1 TO 3 40 READ A(I.J) 50 DATA 1.2.3.4.5,6.7.8.9 60 NEXT J
A: here have to determine about find true false for given code snippet.
Q: 2. [Multiple Choice] A script "iotrace" has been written. Here's what the desired output looks like:…
A: input() function is used to take user input . fprintf is used to display message on screen in…
Q: Find the error content S = '| open ('thefile.txt' 'w') infile.read() infile contents print(contents)
A: The answer given as below:
Q: T1 : Read A ; T2 : Read B; T2 : Write B; T3 : Read A; T3 : Write A; T1 : Read B; T3 : Read B; T2 :…
A: The Answer is
Q: a) make a list of five or more usernames called current_users b) request the number of users c)…
A: Python code: current_users=['Rojan','Morgan','Lishika','John','Kevin'] # a list of current…
Q: Problem 1 Create a new Python script file. Name the file convertf2c.py. Write a program that…
A: 1. code: fahrenheit=eval(input("What is fahrenheit temperature?"))celsius=((fahrenheit-32)*5)/9…
Q: #include using namespace std; int main() { string c_name, address, c_spe, c_status; int…
A: #include <iostream>using namespace std;int main(){string c_name, address, c_spe, c_status;int…
Q: Given: string s; int first, last; Write code to repeatedly validate that first is less than last and…
A: Given: To write a C++ Code.
Q: Write Programm in Python. Work in Groups os Threes. Ensure that the full names and ID number and…
A:
Q: Create an Excel VBA algorithm that runs a user-defined function: multiply three number then divide…
A: Objective: A VBA code should be written to multiply three numbers and then divide the result by 2.…
Q: Which of the following has the highest order of precedence? C++
A: Whenever there are a number of operators in an expression, it is evaluated according to the…
Q: Given the code below, which lines are valid and invalid.
A: Static: This is keyword in which is used to define any variable or method as class specific means we…
Q: d) All processor commands start with the symbol.. Re Maximuum pumber of characters (including HTMI…
A: Every preprocessor command begins with # symbol. We can also create preprocessor commands with…
Q: choose 1 2 , or e 1 to print the symbol with first character 2 to print the symbol with second…
A: C++ program to solve the given problem is below.
Q: : Inputs: number - The user inputted number between 0 and <4000. : Output: roman_numeral The string…
A: According to the information given:- We have to follow the instruction and convert user input…
Q: DESCRIPTION: 1) Input a sentence from the keyboard ending in a period 2) Change all whitespace…
A: I give the code in c++ along with output and code screenshot
Q: If y, = sin(x), y2 = cos(x), y3 = tan(x), where -n<x<n, write a MATLAB script to plot Y1, Y2 and y3…
A: The Matlab code for plotting sin(x), cos(x) and tan(x) have been shown in step 2 with the output.
Q: 5. The directive that marks the end of a logical segment is a) ENDS b) END C) ENDS & END d) None of…
A: Q5. The directive that marks the end of a logical segment is a) ENDS b) END c) ENDS & END d)…
Step by step
Solved in 2 steps with 1 images
- // P41.cpp - A simple elevator for 4 floors and a basement with a // close door button and 5 keys for floors #include<iostream> #include<cmath> using namespace std; void close_door(); int change_floor(int choice, int floor); int main( ) { int key; int floor = 0; cout << "Press a Key \n"; cin >> key; if(key == 0) { close_door(); if( floor != 0){ // otherwise nothing happens cout << "I am moving to the Basement \n"; floor = change_floor(0, floor); } } else if(key == 1) { close_door(); if( floor != 1){ // otherwise nothing happens cout << "I am moving to the the First Floor \n"; floor = change_floor(1, floor); } } else if(key == 2) { close_door(); if( floor != 2){ // otherwise nothing happens cout << "I am moving to the the Second Floor \n"; floor = change_floor(2, floor); } } else if(key == 3) { close_door(); if( floor != 3){ // otherwise nothing happens cout << "I am moving to the the Third Floor \n"; floor = change_floor(3, floor); } }…Please Write a function to validate if the numbers were 1 through 9 if there is a name if email is valid if cell phone i valid if Card number, EXP date and CVV is valid or not if the address is valid or not Below is the html please make the java code as simple as posible thank you. <div class="g"> <div class="n"> <div class="r"> <img class="a"src="stle/pg1/logo.png"> <div class="p">+</div> <form id="result" action="#"> <input type="text" placeholder="Choose from item 1-9"> <input type="text" placeholder="Name"> <input type="email" placeholder="E-mail@gmial.com" id="email"> <input id="Phone nuber" type="text" placeholder="Phone number"> <input id="Card Number" type="text" placeholder="Card Number"> <input id="Card Exp Date" type="text" placeholder="Card Exp Date"> <input id="Card CVV" type="text"…#include <iostream>#include <iomanip>#include <cmath>using namespace std; #define PROPERTY_TAX_RATE_PER_YEAR 1.25#define COST_OF_UTILITIES_PER_MONTH 300.00#define COST_OF_INSURANCE_PER_YEAR 550.00 void inputData(double& sellingPrice, double& interestRate, int& durationOfLoan); void handleAllComputations(double sellingPrice,double interestRate,int durationOfLoan,double downPaymentRate,double& downPayment,double& amountOfLoan,double& mortgagePayment,double& propertyTax,double& costOfInsurance,double& totalMonthlyHouseCost); double calculateDownPayment(double sellingPrice, double downPaymentRate);double calculateAmountOfLoan(double sellingPrice, double downPayment);double calculateMortgagePayment(double amountOfLoan,double interestRate,int durationOfLoan); void outputResults(double sellingPrice,double downPayment,double amountOfLoan,double interestRate,int durationOfLoan,double mortgagePayment,double propertyTax,double…
- EXPLAIN THIS CODE EACH LINE #include <stdio.h>#include<string.h>int main(){ char name[20]; int meal,quantity; int drink,quantity2; char choose_meal[30] = ""; int meal_price; float drink_price, orderPrice; char choose_drink[30] = ""; float cash, change; printf("--------------------Marry's Fast Food--------------------"); printf("\n"); printf("Enter your name: "); scanf("%s", name); printf("Hello %s!\n", name); printf("\n\nWhat would you like to order?\n"); printf("------------------------MEALS------------------------\n\n"); printf("[1] 1 pc. Chicken Joy....................Php 76.00\n"); printf("[2] 1 pc. w/Jolly spaghetti..............Php 99.00\n"); printf("[3] pc. Spaghetti........................Php 55.00\n"); printf("[4] pc. Burger steak w/rice..............Php 85.00\n"); printf("[5] pc. Burger...........................Php 30.00\n\n"); printf("Choose a number…3. Show the Huffman Code for each character in the following string. “boss demigoddess ship”C++ Help me fix my code please! I'm missing something and can't figure it out. Code and error picture are below. #include <iostream> using namespace std; class Employee{ public: string first_name; string last_name; int monthly_sal; int increment; Employee() { first_name=""; last_name=""; monthly_sal=0; increment=0; } void setFirst_Name(string first_name) { this->first_name=first_name; } void setLast_Name(string last_name) { this->last_name=last_name; } void setSal(int monthly_sal) { if(monthly_sal<0) this->monthly_sal=0; this->monthly_sal=monthly_sal; } void setInc(int increment) { monthly_sal += increment; } string getFirst_Name() { return first_name; } string getLast_Name() { return last_name; } int get_salary() { return monthly_sal; } int get_increment() { return increment;…
- 6. Below is an application in which the number of days for each month in the year is stored in anarray. (For example, January has 31 days, February has 28, and so on. Assume that the year is not aleap year.) Display 12 sentences in the same format for each month; for example, the sentencedisplayed for January should be: Month 1 has 31 days. Given the following pseudocode, fill in themissing lines of code start//Declarationsnum monthnum SIZE = 12num DAYS finish declaring and populating arraymonth = 0while month < SIZEoutput complete output statementmonth = ____________endwhilereturnstopCan anyone debug this?#include <iostream>using namespace std;class Employee { public: string name; int status; double salary; double d_salary; int days; void getInfo(){ cout<<"Input the following data: "<<endl; cout<<"Employee's name: "; getline(cin,name); cout<<"Employee's status: "; cin>>status; } void display() { cout<<endl<<"Employee's Information"<<endl<<endl; cout << "Employee Name: " << name<<endl; if (status ==1){ cout << "Employee Status: Regular" <<endl; else cout << "Employee Status: Contractual" <<endl; } double displaySalary() { cout << "Annual Salary : " <<salary; }}; class Regular : public Employee { public: double m_salary; void displayTitle(){ cout<<"Enter the details of the…CHALLENGE ACTIVITY Use C++ 1.11.2: Outputting all combinations. Output all combinations of character variables a, b, and c, in the order shown below. If a = 'x', b = 'y', and c = 'z', then the output is:xyz xzy yxz yzx zxy zyx #include <iostream>using namespace std; int main() { char a; char b; char c; cin >> a; cin >> b; cin >> c; a = 'x'; b = 'y'; c = 'z'; cout << cout << endl; return 0;}
- Case four: I am having a glitch where it enter the college[0] and total_tuition [0] five times and then follows with the other four. I was hoping you can help guide me what I entereed wrong. #include "stdafx.h"#include <iostream>#include <cstdlib>#include <ctime>#include <string>#include <vector>#include <cctype>#include <iterator>#include <algorithm>#include <cmath>#include "ConsoleApplication11.h" using namespace std; string FBTeam;string College[5];string location;string Price_of_Ticket;int choice; int main(){vector<string> CULIST(5);vector<string> FBTEAM(5);string itemNumber; int num;int tuition = 0;int dorm = 0;int meal = 0;int total_tuition[5];int average;const int size = 5;double averages[size] = { 0.0 };bool stop = false, itemFound; cout << "--------------------------------------------------------------------------------" << endl;cout << " Colleges in Texas "<< endl;cout <<…I assume the following 2 codes express the same meaning? int myvar; int * myptr = &myvar; and int myvar; int * myptr; myptr = &myvar;#include <ctime>#include <cstdlib>#include<iostream> using namespace std; char choice;void printMenu();int getSelect(int&);bool isUnique(int[], int, int);void printArray(int[], int); int drawing[] = { 56,34,1,8,12 }; int main(){ int sel; printMenu(); getSelect(sel); return 0;} void printMenu(){ cout << " Welcome to the Lottery\t\n"; cout << "---------------------------------\n"; cout << " 1. Quick Pick\n"; cout << " 2. Pick Numbers\n"; cout << " 3. Exit\n";} void selection1_output(){ int r[5]; for (int i = 0; i < 5; i++) { r[i] = 1 + (rand() % 69); } cout << "Players Ticket : "; for (int i = 0; i < 5; i++) { cout << r[i] << " "; } cout << "\nDrawings : "; for (int i = 0; i < 5; i++) { cout << drawing[i] << " "; } int same = 0; for (int i = 0; i < 5; i++) { for (int j = 0; j…