Write a cpp program to determine whether the roots of a quadratic polynomial are real or complex (imaginary). If the roots are real, find them and assign them to root1 and root2. If they are complex, write the message "No real roots." Use above give formula
Q: Write a program to print the corresponding Celsius to Fahrenheit table.
A: Given: Write a program to print the corresponding Celsius to Fahrenheit table.
Q: Write a program to find the square root of a number taken from user and print that
A: Python used to answer this question
Q: Make an octave program to find the sum of a Geometric Progression by using loops. Ask the user to…
A: Follow the given below instructions for writing the octave program: Input the first term, ratio,…
Q: Write a cpp program to find the number of years, number of weeks and number of days from the user…
A: Given :- Write a cpp program to find the number of years, number of weeks and number of days from…
Q: Write an algorithm to find the maximum of three numbers x,y,z
A: Answer
Q: write a program to input 3 integers and determine which of them is biggest:- Using if(. ) &&(. )
A: We are using only the if conditions here according to the question. The program is written in C…
Q: Q. Write an algorithm, draw a flow chart and also write a C- program to find out area of triangle.…
A: There are various formula to calculate the area of triangle, here it is calculated using the Heron’s…
Q: Write a C++ program to compute the gross pay. The inputs of your algorithm are the hours worked per…
A:
Q: Write a C program to get the first 25 numbers of a Fibonacci sequence. The sum of two consecutive…
A: for (i = 1; i <= n; ++i){ printf("%d ", t1); nextTerm = t1 + t2; t1 = t2; t2 =…
Q: Write an Algorithm, and C++ code to Swap two numbers using third variables.(i.e. exchange the values…
A: Note: There are multiple questions are given in one question. According to the rule, you will get…
Q: Write a c++/cpp program that asks the user to enter a multi-digit number and then prints the largest…
A: Code: // CPP program to largest and smallest digit of a number#include <bits/stdc++.h>using…
Q: Write a C++ program to compute the gross pay. The inputs of your algorithm are the hours worked per…
A:
Q: Write a Cpp program that takes an integer from the user and check whether the number is multiple of…
A: The above question is solved in step 2 :-
Q: Draw a flow chart of an algorithm that read a number (x) as input how many odd and even digits in…
A: The answer of the question is given below:
Q: 02: Write program to read in the values of a, b, c then compute the root values (x) of the equation:…
A: Answer the above program are as follows:
Q: Write a LMC program to input one value X (assuming X is between 1 and 20) and output the sum of all…
A: The LMC program is given by INP STA count loop ADD sum STA sum LDA…
Q: Q1) Write a java program to input three real numbers and find the maximum
A: In the java program, if we finding a maximum number in a given number we used to write code using…
Q: Write a program to find the sum of the numbers that are divisible * by 5 among the numbers from 1 to…
A: SUMMARY: - Hence, we discussed all the points.
Q: (c programming) Draw a flow chart and Write a program to print the following series up to n terms…
A: Flowchart:
Q: Write a Q. BASIC program to find the value of from the following equation: x2+2a3+sin x Y = for any…
A: Algorithm: Start READ x READ a READ k READ r Compute: Y = (x^2 + 2*a^3+sin(x))/(exp(x)-k^(r-3))…
Q: sum of the numbers less than 25 out of the numbers between 1 and 50
A: c++ program is as given below :
Q: Q.4 Write a C program to print all the prime factors of a given number with its frequency. For…
A: We need to find the prime factorization of 24 which is 2 * 2 * 2 * 3. Output will 2 3 3 1 In the…
Q: Write a C program that finds the nth root of a polynomial using the bisection method
A: C Program of the above code is given below:
Q: Find the value of r in the program. >> a=-13; b=-%3; r=0; if (a>0) if (b>10)
A: Here, Code is given.
Q: Write oop program to read 10 numbers and find the summation of first five numbers , and…
A: /*C++ Program to read 10 numbers and find the summation of first five numbers , and multiplication…
Q: Q6: Write C++ program to read an integer number and check if it is positive or negative, even or…
A: Code : #include <iostream>using namespace std; int main(){ int n; cout << "Enter…
Q: Question #1 ::: Write a cpp program to add two even numbers. If their addition is greater than 10,…
A: Task :- Write a cpp program to add two even number and display suitable message. C++ program :-…
Q: /write a program to add two numbers using c ++
A: #include<iostream> using namespace std; int main() // main…
Q: write a program in C++ LANGUAGE to print the following series by using loops: 13 12 60 360
A: Include Header files. Declare the variables num as integers. Get the num value from the user. Using…
Q: Q6: Write C++ program to read an integer number and check if it is positive or negative, even or…
A: Please find the answer below :
Q: B) Write C++ program to read an integer number and check if it is positive or negative, even or odd,…
A: C++ Program for above : #include <iostream> using namespace std; int main() { //read…
Q: C ++ programming Given the code: int a = 6, b= 36; 1. Write a line of code to print 1 if a is an…
A: As per company guidelines we are suppose to answer only 1 question. Kindly re-post other questions…
Q: Write a program to print y from the following equations: Vx +5 Y = IF (x +5) > 10 and x > 0 Y = x3 +…
A: 1)First read the value of 'x' 2)Determine the expression for Y based on given condition 3)Display…
Q: Draw a flow chart for the algorithm that will arrange a list of ten digits in ascending order
A: Start and End are shown in ovals. Actions performed such as reading inputs are given in…
Q: Write a program to find the factor of any binary numbers
A: n = abs(int(input("Enter Integer: "))) n0 = n Factors = [] factor = 1 while n>0: bit =…
Q: Write an algorithm to read 50 integer numbers from the user then display the average of all even…
A: Algorithm for given problem :- numbers[50] for i = 1 to 50 input numbers[i] initialize sum…
Q: Plot a graph for the following polynomials each with x=-100 to +100 with a change in x as 0.2 * Fa)…
A: THE BELOW ANSWER: C++ code: I will be defining methods for each polynomial function and there will…
Q: Type a C ++ program to read N number of the correct type and print your disbelievers each number
A: C++ Program for above : #include <iostream> using namespace std; int main() { //read…
Q: Write a python program to input a number from user and if 1 get then print true else print false.
A: Requirements:- Write a python program to input a number from the user and if 1 get then print true…
Q: Write a program c++ to input number of 3 digits and check any digit is even convert it to 3 and any…
A: An even number is said to be completely divisible by 2, which means it leaves no remainder if…
Q: Write a program to ask the user to enter one number and store the number in BL. Then check whether…
A: Assembly language: Assembly language is a low level programming language. Assembly language is used…
Q: Write a CPP program that prompts the user to input 3 integer values and print these values in…
A: The aim of the program is to display the numbers in ascending order and descending order. Here the…
Q: Write a R program to find the Fibonacci series of the given
A: the program is as given below : # take input from the user nterms = as.integer(readline(prompt="How…
Q: Write a C program If last day of mth month of the year is Friday then find out nth dat (1<=n<=31) of…
A: Program:- #include<stdio.h>int main(){ //fill the code int year, month, lastday, n;…
Q: Q3) Write C++ program to read an integer number and check if it is positive or negative, even or odd…
A: The programming methodology for the program is given by: Including header files Main function…
Q: A typical NMR peak after Fourier transform has a Lorentzian absorptive line shape. This line shape…
A: Solution is in Step 2.
Q: Using Python, write a program to get 10 multiples of any number given.
A: Given: Using Python, write a program to get 10 multiples of any number given.
Ps :see image for question.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Numerical analysis) Given a number, n, and an approximation for its square root, a closer approximation of the actual square root can be found by using this formula: newapproximation=(n/previousapproximation)+previousapproximation2 Using this information, write a C++ program that prompts the user for a number and an initial guess at its square root. Using this input data, your program should calculate an approximation of the square root that’s accurate to 0.00001. (Hint: Stop the loop when the difference between the two approximations is less than 0.00001.)1. write a program to display the squares of all even and odd numbers from X to Y . input of X and Y should be provided by user . make use of user defined function approach .3. Write a program to take input for a number, if the number is palindrome, then display its half on the screen, otherwise take input for 2 more numbers, and display their product on the screen. Use minimum two functions including main function.
- Display the first N magic numbers, where N is a positive number that the user provides as input. Here, a magic number is a number whose sum of its digits eventually leads to 1. For example, 1234 is a magic number because 1 + 2 + 3 + 4 = 10 and 1 + 0 = 1, while 1235 is not (1 + 2 + 3 + 5 = 11 and 1 + 1 = 2). Write a program that prints out the first N magic numbers, seven on each line. You are required to use the following function prototype: bool isMagic(int value); // Returns true if value is a magic number The outline of this function will be as follows: Step 1: Calculate the sum of digits of the value Step 2: Repeat Step 1 until we get a single-digit Step 3: If the resulting sum is equal to 1 then it is a magic number, otherwise not Here is the sample output:c programming - solve with function please Code The function named "odd_ even" to find out whether the integer sent into it is odd or even and prints to the screen.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₁).
- Using functions, write a program that will solve the problem: Create a program that will display the nth numbers in the Fibonacci series. The length of the series depends on the user's input. Use user-defined function and appropriate conditional and looping statements to solve the given problem.Q1/ Write a program that takes hours and minutes as input and outputs the total number of minutes (1 hour 30 minutes = 90 minutes) By using functions.HW: Write a C++ program to calculate the value of y form the following equation when C and D are integer values. C D C D L
- Write a function that implements the quadratic equation. Given three inputs (a, b, and c), calculate the roots (r1 (+) and r2 (-)) of the quadratic formula. Review 19 Write a function that implements the quadratic equation. Given three inputs (a, b, and c), calculate the roots (r1 and r2) of the quadratic formula. Call your function Roots a = 1 b = 2 c = -3 [r1,r2]=Roots(a,b,c)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.HW: Write a C++ program to calculate the value of y form the following equation when C and D are integer values. D oy YOSt gt 5t