4) Write a general program that takes x-y coordinates of a point in the cartesian plane and prints a message telling either an axis on which the point lies or the quadrant in which it is found. Example: (-1.0,-2.5) point is in quadrant 3 (0.0, 4.8) point is on the y-axis Q2 Q1 Q3 Q4
Q: 1) Write a program that reads 3 integers and produce exactly one message of the following 3…
A: As programming language is not mentioned so we are providing answer in C++ language.
Q: H.w: write a visual basic program to read an integer number and check if it is positive or negative,…
A: Program code: Module Module1 Sub Main() Dim num As Integer = 0 Dim find_PrN As…
Q: 6-Write a PYTHON program that takes a date as input and outputs the date's season in the northern…
A: According to the question below the solution: Output:
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere…
A: Volume of a Sphere = 4/3*π*r³Area of a Sphere = 4*π*r²
Q: Write a program that takes a range from the user and display all the even numbers between the range…
A: Note - Since there is nothing mentioned about the programming language to be used, so this program…
Q: 2. Draw a flow chart that displays the squares of all the positive integers up (and including) 100…
A:
Q: 4)Write program that input the user age and print the sentence: a) You are child if the age is less…
A: There is not mentioned any programming language so I used JAVA Step 1 : Declare a variable age and…
Q: Q3: Write a VB program to enter a mark of a student and then find his grade as follows: If mark >=…
A: Get input from user and convert it to integer. Chek the input with all conditions and print output…
Q: Write a program that estimates the value of the mathematical constant e by using the following…
A: The given series program is as follows:
Q: The volume of a sphere of radius 1 inside a cube of side 2 is V= 4π/3. Write a fortran program t
A: Actually, program is a executable software that runs on a computer.
Q: 3. For three resistors connected in series, the total resistance is the sum of the individual…
A: Given: Resistors are connected parallel Therefore Total resistance is Total Resistance =…
Q: c++ Given two sequences with n integers between 0 and 9, interpreted as two n-digit integers,…
A:
Q: Write a program to enter a value of x and compute the value of y where x if x ≥0 -x if x < 0 y =
A: #include <stdio.h>int main(){ int x,y; printf("Enter value of x: ");…
Q: Write in symbolic form: For all integers x,there exists an integer y such that the sum of x and y…
A: A symbolic form of quantifier use symbols like ∀,∃ etc. to represent the statement. It help to…
Q: 1)Write program to make simple calculator? The program input two number and one character? a) print…
A: As programming language is not mentioned i am providing you the answer in C++.
Q: (Racket) Write sequences of cars and cdrs that will pick the symbol 'x out of the following…
A: Given: (Racket) Write sequences of cars and cdrs that will pick the symbol 'x out of the following…
Q: Q1/an A-Write a program to compute the drag force F, (in Newton) When a body swims through fluid,…
A: Logic:- Given values of p=1000 vinf=1.25 A=0.25 Cd=0.09 We have to calculate Fd, Given formula:-…
Q: Q1: Write a C++ program to Calculate the Area of Circle? Q2: Write a C++ program to read three…
A: Part 1) Area of Circle ===================== #include <iostream> using namespace std; int…
Q: Suppose that x, y, and z are int variables and x = 13, y = 45, and z = 20. Determine whether the…
A: a. !(x - y <= 10) Decoding the above line is as follows, ==> !(13-45<=10) ==> !(-32…
Q: 1. Write a program that converts miles to feet. If the distance is more than 15,000 feet, tell the…
A: logic:- read values in miles. Multiply miles value by 5280 and store in feet variable. If feet…
Q: Q5: A/ Use input function to write a computer programming to test the weather state according to a…
A: Solution: The code for given questions is provided below. Here the variable 'x' is considered as…
Q: Q1/A-Write a program to compute the mass flow rate of a fluid (in kg/sec) through a thermal unit…
A: Code: Dim A as DoubleDim M as DoubleDim Po as Double Dim K as DoubleDim R as DoubleDim T0 as…
Q: 6- Write a program to read three numbers A,B,C then find whether A,B,C can form the sides of a…
A: Note: As no programming language is mentioned, therefore answering the given question in python.…
Q: 7. Make a program that will convert an inputted number in inches (in.) and display its equivalent…
A: The problem is based on the basics of C programming language.
Q: 3- Write a program which accept a number of 2 digits and check if ones digit is greater than the…
A: C++ Program for above : #include <bits/stdc++.h> using namespace std; int main() {…
Q: 3) Given three decimal numbers x, y and z. Write a boolean expression that evaluates to true if an…
A: I have provided the boolean expression in step 2.
Q: Write a program that converts the angle from degree to radian and displays each value.
A: "Since you have asked multiple question,we will solve the first question for you.If you want any…
Q: 2. Write an algorithm and draw a flow chart, and write Code in visual basic (using IF Block…
A: 1) Get input for value of x 2) IF x>0 z=x + 3e5 IF x=0 z=3/x + sin(x)…
Q: This program accepts the height of a person in centimeter and categorise the person according * .to…
A: A. 1-ElseIf((p >= 150) And (p < 165)) Then 2-ElseIf((p >= 165) And (p <= 195)) Then…
Q: 9. Write a program that inputs two real numbers then exchanges their values. 10. Make a program that…
A:
Q: Write a program which input radius of circle and compute area of it. Then input the length of side…
A: EXPLANATION - Create a program . Declare three variable radius , length , area1 , area2 . Take…
Q: 5. Write a program that computes the spherical distance between two points on the surface of the…
A: i tried like this in java code: java code: public class Test { static double compute(double…
Q: 2. Write an algorithm and draw a flow chart, and write Code in visual basic (using IF Block…
A: I am giving most answers as per the Q/A expert community recommendation because the main question…
Q: 3. Write a program that outputs the value of x given by the formula X = 5(a+cos (π/3))" √(a²+b²)…
A: Below I have provided Java Programming. Also, I have attached the screenshot of the code and output…
Q: 6. Write a program to read a number representing the time in 24-hours (i.e., 4-digits ). Then find…
A: import java.text.SimpleDateFormat;import java.util.*;import org.apache.commons.lang3.time; class…
Q: Write a program to find the summation of two degrees, Find the grade using If - Block statement and…
A: Answer: Here not specify any programming language so we have code in C++ programming language…
Q: 3. Write a program that checks the screen time of a child and repeats, this procedure three times.…
A: #include<stdio.h>int main(){ int age; float screen_time; for(int i=0;i<3;i++){…
Q: Write a program that inputs a line of text, replaces all punctuation marks with spaces.
A: Program: //header files #include <iostream> #include <string> using namespace std;…
Q: An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The…
A: Program code: // include required header files #include <iostream> #include <iomanip>…
Q: Write a program to check whether the message received at the destination is error-free. For…
A: Algorithm 1. Declare variable length1 and length2 to record length of both the sequence 2. Start…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere =…
A: Given: The program is written in C language to find area and volume of sphere.
Q: In F95 language read input two positive integers l and b which are the length and breadth of a…
A: Write a program in F95 language to read input two positive integers l and b which are the length and…
Q: The ancient Greeks classified numbers geometrically. For example, a number was called "triangular"…
A: Sample Response: // C++ program to check whether a number is a triangular number or not by using…
Q: 1. Select the value for x that is a counter- example to the following statement: For every integer…
A: Answer : The correct options are (a) x = 1/2 and (d) x = 1 Attached the whole explanation for all…
Q: 02: Write program to read in the values of a, b, c then compute the root values (x) of the equation:…
A: Note: Answering the question in C++ as no programming language is mentioned. Task : Input a, b, c.…
Q: 5. Write a program that computes the spherical distance between two points on the surface of the…
A: java code: public class Test { static double compute(double lat1, double lon1,…
Q: Write a program to enter a value of x and compute the value of y where x if x 20 -x if x<0 y=
A: I have provided C CODE along with CODE SCREENSHOT and 2 OUTPUT…
Q: 6- Write a program to read three numbers A,B,C then find whether A,B,C can form the sides of a…
A: Required: write a program to check if a triangle is valid or not and if valid then check if it is…
Q: rite a program that reads a value n and displays n characters alternating between # and % on the…
A: Note: Since you have not provided the language name to write the code so I am using java language to…
Step by step
Solved in 4 steps with 2 images
- C++ Programming Exercise: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: a. The total number of of units. b. The rent to occupy all the units. c. The increase in rent that results in a vacant unit. d. Amount to maintain a rented unit. The program then outputs the number of units to be rented to maximize the profit.Q1. Write a program in G+ language to obtain the equation below, for values of x from (1~ 20), by using for statement: 2 X o Y=—+cosix— vX+ — 4 Ix|C++ Question, Write a Computer Code: Let l be a line in the x-y plane. If l is a vertical line, its equation is x = a for some real number a. Suppose l is not a vertical line and its slope is m. Then the equation of l is y = mx + b, where b is the y-intercept. If l passes through the point (x₀, y₀), the equation of l can be written as y - y₀ = m(x - x₀). If (x₁, y₁) and (x₂, y₂) are two points in the x-y plane and x₁ ≠ x₂, the slope of line passing through these points is m = (y₂ - y₁)/(x₂ - x₁).
- Write a C++ program that asks the user to enter the radius of the circle and then find the Circumference and area of the circle. Cir= 2* pi *R Area= pi*R*RWRITE A PROGRAM TO CALCULATRE THE AREA OF A RECTANGLE OF LENGTH =5 CM AND BREADTH=8CM. CALCULATE THE PRICE OF AN ITEM COSTING 100 GHANA CEDIS AFTER A DISCOUNT OF 10% IS APPLIED TO IT. WRITE A PROGRAM TO CALCULATE THE SIMPLE INTEREST ON A LOAN AMONUT OF 50000 GHANA CEDIS AT AN INTEREST RATE OF 30% FOR A NUMBER OF YEARS WHICH WILL BE SPECIFIED BY THE USER. WRITE A PROGRAM TO CALCULAT THE AGE OF THE USER AFTER THE USER ENTERS HIS OR HER YEAR OF BIRTH.Write a code using C++ for the given prompt: A contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be, say, four inches thick. The length of the patio is to be, say, twice the width. Write a program that prompts the user to specify: The amount of premixed concrete (in cubic yards) ordered The thickness of the patio (in inches) The ratio of length and width Ex. If the ratio is 3 to 2, have the program accept a 3 then a 2. Then compute the ratio using these numbers The program then outputs: The length and width of the patio (in feet). (1 cubic yard = 27 cubic feet.) To calculate the width, you will need to: Find the total cubic feet of the concrete Divide the total cubic feet of concrete by the result of the length to width ratio multiplied by the thickness of the patio, over 12 (inches in a foot) Square root the answer To find the square root of a decimal number, include the header file cmath using the statement #include <cmath>,…
- write a C program XYZ Telegram Company charges P18.50 for a telegram that do not exceed 12 words and P1.50 for every succeeding word, plus P5.00 service charge if type of delivery is special. Create a program that accepts the number of words in a telegram and the type of delivery ‘S’ for special if the customer desires for a special delivery. Compute and display the customer’s charge.Create a C++ program that will input a single letter and printout the corresponding digit on thetelephone. The digits and letters on the telephone are associated as follows:2 = ABC 3 = DEF 4 = GHI 5 = JKL6 = MNO 7 = PRS 8 = TUV 9 = WXYThere is no digit corresponding to either Q or Z. for this letters your program should print amessage indicating that they do not exist on the telephone dial. The program should use switchstatement accept either uppercase or lowercase.Write a program that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the numbers, the operator, and the result. For division, if the denominator is zero, output an appropriate message. Limit the supported operations to + -/ *and write an error message if the operator is not one of the supported operations. Here is some example output: 3 + 4 = 7 13 * 5 = 65 C++
- C Language Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of 2), the absolute value of y, and the square root of (xy to the power of z). Output each floating-point value with two digits after the decimal point, which can be achieved as follows:printf("%0.2lf", yourValue);Write C program which should print your name and registration number on the screen then do the following:an industry has launched an online shopping ordering system which sells 5 different products. A list of productnumber, product name and their retail price is given below:Product No. Product Name Retail Price in Rs. Quantity Available101 Soap 60.00 10102 Liquid Hand Wash 200.00 20103 Liquid Dish Wash 150.00 30104 Table cleaner 350.00 40105 Hand Sanitizer 100.00 50 Your program must store this information in an array of struct product type. You must declare the struct product_type. (HINT: You can make any other structures or arrays of structures that you think might help you solve this problem.) Your program should…If the statements p and q are both true while statement r is false. which of the following has a false truth value?* a. If r then (p or q). b. Not (r and (not p or q)). c. (p or r) if and only if not q. d. If not (r and q) then p.