Q.6 Write a C++ program that takes 6 values from user and makes a multiplication table of those numbers till x6. Example: Please Enter 6 numbers 1234 5 6 Output: 1* 1 3 4 5 6.
Q: 2. Write a C++ program with the main() function as follows: - ask the user Enter numbers for…
A: As per guidelines we are supposed to answer only one question. Kindly repost other questions as a…
Q: Q2: Write a C++ program to read three integer numbers A, B and C then find the result of…
A: #include <iostream> using namespace std; int main(){ //declaring variables int A,B,C,Z;…
Q: Q1: Write a C++ program to compute the sum of the specified number of Prime numbers. For example,…
A: Ans: Code: #include <iostream>using namespace std; int main(){ const int MAX = 1000000;…
Q: • Q1:Write a C++ program that reads a number and determine if it is positive or negative.
A: Note : kindly, upload remaining question again . C++ Program for Q1 : #include…
Q: EXERCISE 2: Write a C program to evaluate the following equation: i=m j=i i=1 j=n Where m and n are…
A: The program ask user to enter the value of m and n. Outer loop is for the first summation expression…
Q: HW.1/ Write a c++ program to read 20 different numbers and find the maximum number among them? then…
A: #include<iostream>using namespace std;int main(){ int n, max = 0;…
Q: 4. Write a program that computes the following equation: 1 2 n y = 1+=+ x2 ... 5. Write a C++…
A: We can use simple for loop to solve these problems. Follow the below code and explanation for better…
Q: 3.Write a C++ program that inputs 10 integer numbers and prints out the two largest entered values.
A: Here is your code
Q: Write a C++ program Asks a user to enter 5 integers and save them in five different variables, find…
A: Program Approach: Including a necessary header file Declaring the main method Declaring five…
Q: write a program in c++ Language to insert two integer numbers and then swap these numbers by using…
A: #include <iostream>using namespace std;int main() { int a,b; cout<<"Enter 2…
Q: 4. Write a C++ program that reads an integer X, then calculates and outputs the sum of the following…
A: Here is your code
Q: Write a program that enters a set of numbers and calculates only the frequency of the number 5,…
A: I give the code in C++ along with output and code screenshot
Q: Q4: Write a program in C++ that computes e by using while loops only. x2 x3 + +..+ 2! 3! x" e* = 1++…
A: Program plan: Prompt for the value of x and n. Iterate over the range n to find the total of the…
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: Write C++ code that asks the user to read two real numbers the angle x and N. Then compute and print…
A: I have provided C++ program for the given equation of R step 2.
Q: Q1/ write a C++ program that find the largest number between three numbers?
A: When we consider a C++program, it can be defined as a collection of objects that communicate via…
Q: Q9. Write c++ program to find the value of the amount In(Y) if you know that (Y + X – 1)² (Y + X –…
A: Step 1:- Program Approach:- (i)Declare two header file (ii)Math.h header file is used to perform the…
Q: 1. Write a C program to generate 5 random numbers in the range [1,1000] and print the numbers and…
A: Given C program to print random number in range [1,1000]
Q: write a c program that asks user to enter integer 10 numbers then find the numbers that greater than…
A: Program approach:- //header file. //main function. //print numbers. //print the number greater than…
Q: Write a single C++ statement that corresponds to the two MIPS as add f, g, h add f, i, f O h = g…
A: Here in this question we have given two assembly instructions and we have asked to write a single…
Q: write a c++ program that asks the user to type 10 integers. Program must compute how many even and…
A: #include <iostream>using namespace std; int main(){ int n[10],c1,c2,c3;…
Q: Q9. Write c++ program to find the value of the amount In(Y) if you know that (Y + X – 1)², (Y + X –…
A: Step 1:- Program Approach:- (i)Declare two header file (ii)Math.h header file is used to perform the…
Q: 3. Write a C program to print generate 5 positive random numbers less than 100 and also print the…
A: Write a C program to print generate 5 positive random numbers less than 100 and also print the…
Q: Q2\\ Write a C++ program to read 10 numbers then find the square of a number, ?if it is even
A: #include <iostream>using namespace std;int main(){ // Declare array of numbers, square to…
Q: Q2: Write C++ program to read integer number and print the equivalent string. 0Zero 1 One
A: Include Header files In main ()Declare the variables num, and a; Get the number from the user Using…
Q: 2. Write a C program to compute the telephone bill of a customer. Rates are as follows: No. of…
A: Ans: Code: #include <stdio.h> int main(){ double no_of_calls; double rate;…
Q: 33. In the C programming language, write a program to input an integer x and print the value of…
A: Write a program in C language to input an integer x and print the value of sin(3*x)+cos(3*x) in the…
Q: 3/ B/ Write a C++ program to find the value of (z) according to the conditions of x and y. log a +…
A: #include<iostream> #include<math.h> #include<stdlib.h> using namespace std; int…
Q: Write a C program using if-else. The program reads one character ch. Then it reads one real number…
A: We are give two condition inside if-else cases. 1) If user inputs character a or A. 2) If user…
Q: Write a C++ program that asks a user to enter an integer between 0 and 1000 and adds all the digits…
A: Note: Comments mentioned in code for better understandability. Code: #include<iostream> using…
Q: a) Write a program that accepts two numbers and print their sum if first number is an odd number, b)…
A: a) #include<iostream>using namespace std;int main(){ int n,m; cin>>n>>m;…
Q: Q2: write a complete program in c++ Language to input a number and check if a number is less than or…
A: Include required headers and libraries. Prompt the user to enter the input. Read input using…
Q: Write C code for a program that reads a positive integer number n, and then calculates and prints…
A: Main logic:- for(int i=1;i<=n;i++) { if(i%2!=0) sum=sum+pow(e,n)/i; else…
Q: Q2\ Write a complete C++ program that shows the following output for a different number of rows…
A: According to the given question, the proper solution is given below:
Q: Q1:Write a C++ program that reads a number and determine if it is positive or negative.
A: According to the guidelines , I can only solve the first question. Algorithm : Step 1 : declare…
Q: Write a C that reads in 10 integen number and prints back those numbers revesed that can be divided…
A: Using for loops we can solve this problem.
Q: Q2// Write C++ program to read three numbers and find the sum of odd numbers ? that are dividable on…
A: ALGORITHM:- 1. Take input for 3 elements. 2. Initialize a variable that will store sum with 0. 3.…
Q: Write a C++ program to take two number inputs from user and show the list of not-prime numbers…
A: for (int i = num1; i <= num2; i++) { if (i == 1 || i == 0) continue; // flag variable to tell //…
Q: 4. Write a C++ program to generate 3 random integers in the range [1,100] and for every random…
A: Write a C++ program to generate 3 random integers in the range [1,100] and for every random number,…
Q: Write a c program that ask user to integer 10 numbers then find the numbers that greater than 60.
A: PROGRAMMING APPROACH: Define the necessary header file. Define the main() function. Declare the…
Q: Q.6 Write a C++ program that takes 6 values from user and makes a multiplication table of those…
A: The answer is...
Q: 3. Write a C++ program to print the week days from the week number(1= Saturday, 2= Sunday,.. 7=…
A: We are going to write a C++ code which will print week days based on weekday number given based on…
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: Q4/ A/ Write a program in C++ to find the sum of the series: a = 5 + 2 + 4 +8 + 10 + …· +n ...
A: Please find the answer below :
Q: Write a C++ program to count the sum of integers which are divisible by 3 or 5. You should prompt…
A: Declare integer variables to hold the count of numbers divisible by only 3, the count of numbers…
Q: Q2) Write a C++ program that finds the value of W defined by the following equation: ((a + b) – 3)2…
A: I have provided default values of a, b, x and y as an example to find the value of W using the given…
Q: Hello, in C Write a program that reads any infix notation (without parentheses) and converts it…
A: The Answer is in step-2.
Q: Q4: Write a program that computes and print the sum for an input integer n,a,c . E fx = c, + c1 (x -…
A: In this code; the sum of Taylor series is calculated by the user input with values of n,x,c and a.
Q: Write a C program that asks user to enter a positive number to be checked if the value entered has a…
A: While doing programming in any programming language, you need to use various variables to store…
Q: Write a C++ program that takes a 4-digit number from user as and input and displays all the…
A: #include<stdio.h>int main(){int i,j,k,l,m,n; printf("Enter the digit number : "); scanf("%d",…
Step by step
Solved in 2 steps with 1 images
- Write a program in C that displays the classic BINGO game, displays a BINGO card (5x5 square), and tests the bingo card for a winner via 2 users Steps: 1- Ask user 1 to enter 24 numbers between 10-40 no duplicates / check for range and repetition 2- Ask user 2 to enter 24 numbers between 10-40 no duplicates / check for range and repetition 3- Design 2 BINGO cards as you see below 4- Distribute the numbers onto the 2 cards with each user input with 0 in the middle 5- Display the 2 cards in 1 screen as you see below 6- Generate a random number between 10-40 no duplicates / check for range and repetition 7- Compare the random number with the numbers on the 2 cards 8- If the random number matches any number on each card, change the number on the card to 0 9- Check for winning cards 5 numbers in a row or column = 0 5 numbers in a diagonal = 0 all 4 corners of the card = 0 if any of the players won, display who is the winner and exit the program if the 2 players won, display both are…Write a C++ program that takes a 4-digit number from user as and input and displays all the combinations of those digits.For Example: Enter number: 5321Possible Combinations are:5321, 5312, 5231, 5213, 5123, 5132 3521, 3512, 3251, 3215, 3125, 31521523, 1532, 1253, 1235, 1325, 1352 2513, 2531, 2153, 2135, 2315, 2351In C++, an int is in the range 0 to 65535. But what if we need to add larger integers? Compute the sum 2345566777844567 + 9999988777765768009998. Write this function:string add(string a, string b) where a and b are strings expressing integers and the function add(a,b) returns a string signifying their sum. Strings a and b can have at most 100 characters. Write a main program that loops, asking the user for a and b. The program should terminate if the user enters “done” what asked for “number” a.
- In C++, write a program that checks whether there are duplicated numbers within three user inputted numbers, and return if "all the numbers are distinct", "all numbers are the same", or if "there are two are duplicated numbers."Write a simple program in C++ that lets the user input a single integer n where 1 ≤ n ≤ 100000. The program should print the sum of the first n prime numbers. In the first example below, the first 5 prime numbers are 2, 3, 5, 7, and 11. Example #1: Enter integer: 5 Prime sum: 28 Example #2: Enter integer: 100000 Prime sum: 62260698721Write a C++ program that uses the following for loop: for ( int i = 0; i < e; i++ ) { for ( int j = 0; j < f; j++) cout << *(*(b+i) + j ) << “\t”; cout << endl;} To print the following multiplication table: 1 2 3 4 5 6 7 8 92 4 6 8 10 12 14 16 183 6 9 12 15 18 21 24 274 8 12 16 20 24 28 32 365 10 15 20 25 30 35 40 45 In your program, it is given that e = 5 and f = 9.
- Write a code in C++: Write a program to factor a polynomial of the form x² + bx + c, where b and c are integers AND also modify the program so that it can also factor polynomials of the form ax2 + bx + c , where a, b, and c are integers. For example, the polynomial "- 2x² - 3x + 2" can be factored as: "- 2x² - 3x + 2 = (-2x + 1)(x + 2) = - (2x - 1)(x + 2)". The output at the end should be this exact quote: "- 2x² - 3x + 2 = (-2x + 1)(x + 2) = - (2x - 1)(x + 2)"Write a C++ program that Ask user to enter an integer number and then determine whether the number is prime or not? Note: a number is prime that it is only divisible by 1 and itself. such as 3,5,7,13,..Write a C++ program that accepts a positive integer (orstring) as input and then displays a new number obtained by replacingevery pair of repeated adjacent digits by a single digit. For example,the integer 558834226 has three repeated adjacent digits: 55, 88 and 22.This means that your program should display the integer 583426 insteadof (558834226). You may assume that no digit is repeated more than twice.
- int p = 200;int q = 100;if(p%2==0){q = q/50;}else{q = q/100;}q = ? What will be the final value of q after execution. In C++Encryption is commonly used to disguise messages on the internet. A Caesar cipher performs a shift of all of the characters in a string (based on their ASCII values, see Table 2.1), e.g. h e l l o → m j q q tThe example shows a shift with a distance of 5characters, i.e. h(ASCII:104) → m(ASCII:109)Write a C/C++ program that asks the user to input a line of plaintext and the distance value and outputs an encrypted text using a Caesar cipher, with the ASCII values range from 0 through 127. Use underscores (ASCII: 95) to represent space characters.Underscore characters should not be encrypted, and any character that is encrypted may not become an underscore. In this case, the character should be changed to the next character in the ASCII table.The program should work for any printable characters.NB: No strings (datatype) or library functions may be used.See Figure 2.1 for example output.Write a C++ program called Fibonacci to display the first 20 Fibonacci numbers F(n),where F(n)=F(n–1)+F(n–2) and F(1)=F(2)=1. Also compute their average. The output shall looklike:The first 20 Fibonacci numbers are:1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765The average is 885.5