Write a C++ program that gives the following output :
Q: Write a C program that prompts the user to specify the coefficients of a quadratic equation and then…
A: Explanation: The term b2-4ac is known as the discriminant of a quadratic equation. It tells the…
Q: 3. What is the output of the following C++ program? int x, y; for ( x = 1; x <= 4; x ++) for ( y =…
A: nested for loops are used in the given:all the statements inside a loop will run until condition of…
Q: Write a C program that plays the game of "guess the number" as follows: your program should be…
A: #include<stdio.h> #include<stdlib.h> void guess_number(int number,int temp){ //if…
Q: Write a C program to implement the following requirement:
A: In this question, we are asked to write a c program to print the number of words and reverse the…
Q: Write a C# program in which accept two numbers and returns addition and multiplication of the value…
A: I have given the c# code given below to addition and multiplication using out parameter.
Q: write a c++ program that swap and integer with string.
A: Here we will write a c++ program that swap and integer with string.
Q: 3. Write a C++ program that computes the power of an integer number.
A: #include <iostream>using namespace std;//method to find power of a integerint power(int b,int…
Q: op, develop a C++ program that lays the output as follows:
A: Explanation: make two variables to track the sum of 100 students and maximum element. Code:…
Q: Write a C++ program that reads a real number, and then separates this number into an integer and…
A: Given, A real number 'number', we have to separate the integer part and fractional part. example-…
Q: 5) Write a complete C++ program that reads two whole numbers into two variables of type int and then…
A: Given:
Q: Q4:- / Write a c++ program to print the Even numbers between (0-66)?
A: The C++ code is given below with screenshots
Q: Write a C# program that accepts your name and age as input from the user
A: Start. Ask the user to input their name and age. Print the same. Exit.
Q: 3. Write a C++ program that computes the power of an integer number. usejostream
A: First we will input an integer number. Then we will input the power. And with the help of pow…
Q: 3. Write a C++ program that find and print the value of Z, for the fallowing equations: *= 1 x+2 x=…
A: here is your code
Q: Question 2.Write a C program that produces the following output 1 1 4 3 9. 16 5 25 6. 36 7 49 8 64 9…
A: C program to produce the number and their square using the nested loop. The nested loop displays the…
Q: Write a program in C plus plus using constructor to print two numbers the numbers should be given as…
A: Lets see the solution.
Q: 2. Write a C++ program that computes the sum of integer numbers divisible by 6 that are from 20 to…
A: #include <iostream>//iostream included for outputusing namespace std;int main(){ //2 int…
Q: 3. What is the output of the following C++ program? int x, y; for (x = 1; x <= 4; x ++) { for (y =…
A: Dear Student, Here ++x pre increment operator value is incremented before expression is executed.…
Q: Problem What is the output of the following C++ code? double num = 5.0%3; cout (num / 2.0) + 1;…
A: The question is on finding the output of the given C++ code.
Q: Write a program in C language to take input an integer x from user and print the value of sin2(x) +…
A: Given: An integer x taken input from user. Requirement: Write a C program to print the value of…
Q: Write C++ program to print the following pattern using for statement only:
A: The number of stars in each line goes on increasing from 1 to 10 and then dropped to 0 again So, for…
Q: Write a complete C++ program that: 1) Prompts the user to enter from the keyboard two numbers of…
A: Stating that per our company guidelines we are supposed to answer only one question. Kindly repost…
Q: Write a C++ program that prompts the user to input an integer called number and then prints the…
A: Required: Write a C++ program that prompts the user to input an integer called number and then…
Q: 1- Write a c++ program to print the output of the following equation: y= -x+x? - x3+ x* +x"
A: According to the guidelines we are allowed to answer only the first question. Please ask the other…
Q: Write C++ program to print the following pattern using for statement :only * ** *** * *** ***** * *…
A: Write C++ program to print the following pattern using for statement only.
Q: Rewrite the following C program using if-else statements.
A: //code begins #include <stdio.h> int main(void){ int score; printf("Please enter a score…
Q: Write a C++ program that accepts a user-input integer number and output the multiply ?of number by…
A: Program code: #include <iostream>using namespace std;//define main functionint main(){…
Q: Write a C++ program to overload area() function to calculate area of shapes like triangle,square,…
A: Define header file <iostream> for i/o operations. Declare a function area() with one integer…
Q: 3. Write a C++ program that computes the number of decimal digits in a positive integer number using…
A: The required code is as follows:-
Q: iv) Write a C program to find the value of y after taking input the value of x and x² + y?, where…
A: Step-1: Start Step-2: Declare integer variable x and value. Step-3: Declare a float variable y…
Q: Write a C++ program that enter an integer and output the double of that integer?
A: #include<iostream>using namespace std;int main(){ int a; cout<<"Enter an integer\n";…
Q: write a c++ program for the following
A: cout << "+"; for (int a = 0; a <= n; a++) { cout << "-"; } cout <<…
Q: 5. Write a C program in which the user can input the radius of two soap bubbles that combine to form…
A: Write a C program in which the user can input the radius of two soap bubbles that combine to form a…
Q: Write a C++ program to RemoveDirectory
A: Write a C++ program to RemoveDirectory.
Q: Write a C++ program that accepts a user-input integer number and output the multiply of number by…
A: Program code: #include <iostream>using namespace std; int main(){ int n, i= 10;…
Q: Write C++ program to print the following :pattern using for statement only
A: I have given an answer in step 2.
Q: 2. Write a complete C program that reads two numbers and an arithmetic operator (+, -, *, /) then…
A: Below is the required C program: - Program Approach: -• Including necessary header file• Function…
Q: Write a C ++ program that accepts two integer numbers From the user named (number I,number 2) and…
A: PROGRAM#include<iostream>using namespace std;int main(){int number1, number2,…
Q: Write a c# program to display the square of the number up to certain integer and you have to take…
A: Input a number from user and then iterate a loop to iterate from 1 to that particular number and…
Q: What would be the possible output of the following C program?
A: In the main function of code: First, 3 numbers to be input that are a, b and c and must be in [0,39]…
Q: 2. Write a C++ program that computes the sum of integer numbers divisible by 6 that are from 20 to…
A: algorithm step 1: start step 2: set i=0, sum =0 step 3: start for loop from 20 to 100…
Q: Writing a C ++ program that reads 15 numbers and calculates and prints the sum of every three…
A: Algorithm: 1. Start 2. Read 15 elements in an array. Initialize sum to 0 3. Traverse through the…
Q: Question 2 Write a C++ program that reads in two integers and determines and prints if the first is…
A:
Q: Write a C Program that calculate the following equations and display the value for x, y and z in…
A: Solution: code: #include<stdio.h> #include<conio.h> void main { float x, y, z;…
Q: Write a complete C++ program that convert length in feet into meters.
A: Write a complete C++ program that convert length in feet into meters.
Q: What is the output for C++ code below: for(int i=1;i<=5;i++) { if((i%2)!=0) { cout<<i<<" "; }
A: C++ Code snippet is given, for(int i=1;i<=5;i++) { if((i%2)!=0) {…
Q: Write a program in C++ that follows the flowchart given below.
A: Given To complete a program that clear the concept of while loop.
Q: Write a c program that generates all the numbers 1-10000 with the following conditions it's 4…
A: Given that Have to make a c program that generates all the numbers 1-10000 with the following…
Step by step
Solved in 2 steps with 1 images
- Write a program in C that creates a simplified railways network. The program starts byoffering the user the following list of options :1. Please enter 1 to add a new record of stations .2. Please enter 2 to add a new record of tracks.3. Please enter 3 to sort and print the tracks according to their lengths in descendingorder .4. Please enter 4 to find and print the station that has the maximum number ofconnected tracks .5. Please enter 5 to exit the program.Notes about the program:1. The information about each station is composed of the following attributes:Number and Capacity.2. The information about each track is composed of the following attributes:Number, Length, StStation, and EnStation.3. After accomplishing any of the tasks (1, 2, 3, and 4) or entering an invalid value,the program will show the list of options again.Write a C/C++ language program that reads the file numbers.txt and checks each number for being a prime number. Only the prime numbers from these are then written to a text file prime.txt.THIS FOLLOWING PROGRAM IS TO BE WRITTEN IN C++ DO NOT ANSWER IN JAVA C++ PROGRAM: There is a rule that when a player puts a disc on the board, it must be adjacent to another disc already on the board. We will implement part of this rule. C++ PROGRAM to WRITE: Declare a board and read it from a file. The file othellopos1.txt is on Sakai. Its form is as shown on the previous page. Print the board and all the places that a player can put a disc above another stone on the board. Here is the result of a run of the program. N stands for “north.” ........ ...O.... ...XX... ...OX... ...XOO.. ..X.O... ........ ........ LEGAL N MOVES ROW COL 0 3 1 4 3 5 4 2 ALL DONE IN C++ no need to create the game just console
- Write a C program that allows you to erase multiple spaces in a text file. Then re-write the sentence without extra spaces in another text file. (Use C programming to solve this) Input:I love Java Programming Output:I love Java Programming.Write a c program for a simple student record.Each record should contain the following information:● Surname – a string (surname of the student)● Sex – a character (M for male, F for female)● Year – an integer (year part of student number)● Snum – an integer (last five digits of the student number)● Department – a string (department the student is a part of)Your program should be able to allow the user to:● Add records● Display all records● Display all records filtered by sex/ year/ department● Display record(s) linked to a given snum (last five digits of a student number)Note: student number should be displayed following the format year - snumIn C Language Not Like This #include void histogram(int counter[][1]) { int i,j,k; printf("\nHistogram of alphabets in the given file\n"); for(k=97,i=0;i
- Write a C++ program: Ask user to give you a list of the numbers and then Sort them, by calling two functions: Asc(Sort in Ascending order), and Desc(Sort in Descending order): Do it by pointer.Write a java program. The program asks for an input of the name of a txt file. Then creates a Multiplication Table from 1 to 9, and writes the table into the file. When you run your program, you may see the result like this:Please explain the flow of this C++ Program. It doesn't have to be long as long as you explain the each function of the program, if you can explain it line by line then it is better and I will give you a good rating. #include <cstdlib> #include <math.h> #include <cstring> #include <iostream> using namespace std; class HashTable { string* table; int N; int count; // TODO: Polynomial Hash Code using a=7 int hash_code(string key) { int code; int hash = 0; for (int i = 0; i < key.size(); i++) { char ch = key[i]; code += ((ch - 96) * pow(7, key.size() - (i + 1))); } return code; } // TODO: This hash table uses a MAD compression function // where a = 11, b = 461, p = 919 int compress(int code) { return (((11*code)+461) % 919) % N; } // Using the knowledge that a hash function is composed of two portions int hashfn(string key) { return compress(hash_code(key)); } public:…
- Write a C++ Program to generate Fibonacci Triangle. ////Please give a correct code. I have once asked this code and got a wrong code please don't copy it.//// it's urgentWrite a java program that asks a user to enter a set of positive integer values. When the user stops(think of sentinel value to stop), the program displays the maximum value entered by the user. Yourprogram should recognize if no value is entered without using counter. Sample run:Write a C program for library management system fulfilling following details:addBook(): This function gives admin the right to add book and author name into thebookdetails[ ][ ].searchBook(): Takes the book name as an argument and returns true if the book exists and falsein case it doesn notdeleteBook(): Takes the book name as an argument and removes it from the bookdetails[ ][ ].bookdetails(): prints the complete record of the books the library contains.At the end, store the book details in a text file.