1- Write a program to read a sequence of number (n), then print the times repeat of a specific number.
Q: 2- write a program to count from 20 to 1000
A: #include <stdio.h> int main(){int count = 0;for(int i = 20; i < 1000; i++){count = count…
Q: 5. Write a program to print even numbers from 1 to 10, print every number in a separate line.
A: use loop to iterate from i=1 to 10. use if statement and mod operator to check if i%2==0…
Q: Task 1. Write a program to accept the rows number from a user and print the reverse number pattern…
A: The algorithm for the given problem: Start initialise n, j and i Read the value of n for n to 1:…
Q: 07: Write a program to read 3 numbers, and write the largest and smallest numbers. 08: Write C++…
A: #include <iostream> #include <conio.h> using namespace std; int main() {…
Q: 1- Write a program to find the average of 50 numbers and print the result.
A: Note: We are only allowed to solve one question in one post. I am solving the first one here. please…
Q: 15.Write program to prints "OK" if each digit in the number (Num) divisible by N, otherwise prints…
A: use % operator to fetch all digit of num. Check it is divisible by N or not for each digit.
Q: 11. (a) Write a program to compute and for 1sns 100, where f(n)= n/2 if n is even and f(n)-3n+ 1 if…
A: Answer: Algorithms Step1: We have taken user input Step2: if user input is even then print the n…
Q: 2. Write a program that generates a two-column table showing Fahrenheit temperatures from -40F to…
A: The given program is in java.
Q: 1. Write a program to find the summation of the first ten numbers using do-while loop. * Your answer
A: Since no programming language is mentioned, I am using c++ Algorithm: Start Read 10 numbers in an…
Q: Q1- Write a program to read a number (x) from input. Then print all its factors.
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful.…
Q: Write an algorithm to find maximum of n numbers.
A: In the given question we need to obtain the Maximum Number from n Numbers. For this , we would use…
Q: Q3. Write a BlueJ program to generate 10 random numbers from 1 to 100.
A: public class Main{ public static void main(String[] args) { System.out.println("Random 10…
Q: Q2: Write a program to input an integer number and find if it is a primary number or not
A: primary numbers are the prime numbers only that are divided only by 1 and itself. OR they have…
Q: 3. Write a program to compute the sum of all odd natural numbers in the range 51 to 100 (both…
A: logic:- set sum=0 iterate from i=51 to 100 check if i%2==1 (for odd condition)…
Q: Exercises: !!write a program to find n factorial (n!) write a program to enter n numbers and find…
A: As per guidelines, I'm supposed to answer first 3 parts. Repost the other question as separate one.…
Q: Q3.Write a program to enter two strings then find: a.length of strings. b.copy second string to…
A: Given:
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: Q2- Write a program to compute the Summation (S) of values from 2 to 100 where: S = 2+4+6+. .100.
A: "Since you have not mention any programming language, so we will write our program in C++ language."…
Q: Q7: Write a program to read 3 numbers, and write the largest and smallest numbers.
A: Program description: n is user input which stores the number of integers to be read. a is an integer…
Q: If x from (1-10) write a program to print the summation of every two consecutive even numbers (2+4)…
A: Required: If x from (1-10) write a program to print the summationof every two consecutive even…
Q: 3. Write a program to scan a number n (or use any variable) and then output the sum of the powers…
A: #include <stdio.h>#include <math.h> int main(){ int n; int sum=0;…
Q: Q4: write a program to read 10 numbers .and print all number is a prime
A: As No Programming language is mentioned, writing this program in C++ Code : #include…
Q: Write a Program to find all Roots of a Quadratic Equation
A: a,b, c are coefficients where x can be calculayed by: x = [-b +- (b^2 - 4ac)^1/2] /2a D = b^2-4ac is…
Q: 3. Make a program to display all EVEN numbers from 1 - 100.
A: The question has been answered in step2
Q: 1.write a program to find the average of even and the average of odd numbers from 20 entered…
A: Hi, Since there are multiple questions in this post, as per our policy, I'll answer the first…
Q: 3) Write an algorithm for a program that inputs the of grades of an arbitrary number of students and…
A: 1) Algorthm that inputs the grades of arbitary number of students and output highes grade Declare…
Q: Q8: Write a program to find the summation from 1 to x, for 20 values.
A: Sample Response: //C++ to computes the sum of 1 to x, 20 values#include<iostream>using…
Q: A- write a program that multiply a number in Ax by 19
A: A- write a program that multiply a number in Ax by 19 8086 Multiplication InstructionsThe…
Q: Lab p-4) Write a program that prints the sum of the even numbers and the products of odd numbers on…
A: function main(): Start Declare number, arr[10], i, sum = 0, product = 1 Read number Read integers…
Q: C: Write a program to find the summation of the numbers from 5 to 15.
A: Step 1 : Start Step 2 : Declare the variable sum to hold the calculated sum and variable n for the…
Q: Q4/ Write a program to find a minimum number between fifteen (15) numbers.
A: Since programming language not mentioned, using C++ language.
Q: 9- Write a program to find n!
A: Write a program to find e^x=1+x/1!+x^2/2!+x^3/3!+.......
Q: Q5): write a program to read an integer from 1 to 7 and print th name of the day in a week.
A: Using array of weekdays: Or alternative code using switch statement:
Q: A- Write a program to input 5 numbers and then find its half
A: As no programming language is mentioned it is solved using basic C++
Q: 6. Modify the previous program to find every prime number less than or equal to n.
A: Python Program: from math import sqrt def prime(n): divisor = 2 found = False…
Q: 3. Write a program to compute the sum of all odd natural numbers in the range 51 to 100 (both…
A: Write a JAVA program using a while loop to compute the sum of all odd natural numbers in the range…
Q: H.W / Write a program to compute the sum and count of positive and negative numbers from list of…
A: As coding language is not provided i am providing the code in c++: #include <iostream>using…
Q: 1. Write a program to print Prime numbers
A: Given:-
Q: 1. Write a program to read 2 numbers. Display the greatest of all.
A: Note: Answering the first question as per the guidelines. Input : Read two integers Output :…
Q: Q1/ write a program to enter a number from(1-100) and find sum odd number only
A: Find Your program Below #include <stdio.h> int main(){ int n,sum=0,i; printf("Enter a…
Q: Q5: write a program to read 3 numbers and .print max number
A: As no programming language is mention i am doing it in Python #asking user for…
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: 1- Write a program to compute the value of y: y =+ 3 n Where %3D ... x2 x3
A: #include<iostream> #include<math.h> using namespace std; int main(){ int x,n;…
Q: ex5 write an algorithm that inputs a n number and Input a number. Add a number to another number.…
A: The algorithm is added below line by line
Q: Using C++ Write a program that prints all prime numbers less than 100.
A: Program: #include <iostream> using namespace std; int main() { int i, Number, count;…
Q: write a program to read number to find prime or not prime
A: NOTE: As the language is not mentioned, the below code is C++ language. Algorithm: Initialize…
Q: write a program to enter n numbers and find the average of negative numbers only.
A: In the given question the calculation of the average of N numbers is very simple. Here is the…
Q: a. Write a program prints all the functional numbers up to an input limit.
A: Note: Since no programming language is mentioned. I am attempting this in C++. if you need it in any…
Q: 1- Write a program to compute the value of y: 25 + 49 3 y = 1+++ Where 5
A: Since the language is not mentioned, I have done the first question using Python 3.
Q: his is program. N
A: I have written python code for it.
Step by step
Solved in 2 steps with 3 images
- Write an O(n) program that prompts the user to enter a sequence of integers ending with 0and finds the longest subsequence with the same number. The figure below shows somesample output of the prograa) Write a recursive function to calculate the sum of numbers from 0 to 10Expected Output:55 b) Write a function to Return the largest item from the given list4. Write a program that prints all the composers in the list['Rzewski', 'Ruggles', 'Carter', 'Stockhausen','Stravinsky']whose name has at least 10 characters.>>> ========================= RESTART=========================>>>StockhausenStravinsky
- Q1: Write a program that reads 10 numbers and then finds the largest number and prints it and finds the smallest number and ey(Use Dev C++) Write a program that reads a list of scores between 0 and 100 and finds and prints the smallest and the largest scores. The program needs to ask for the number of the scores from the user; thisnumber must be less than or equal to 10C++ : Write a program that reads a list of positive integers less than 1000 from a keyboard. The program prints thesum and the average of the numbers. The program will stop when the user types 1000 as a sentinel.
- (Numerical) Write a program that tests the effectiveness of the rand() library function. Start by initializing 10 counters to 0, and then generate a large number of pseudorandom integers between 0 and 9. Each time a 0 occurs, increment the variable you have designated as the zero counter; when a 1 occurs, increment the counter variable that’s keeping count of the 1s that occur; and so on. Finally, display the number of 0s, 1s, 2s, and so on that occurred and the percentage of the time they occurred.15. Write a program to implement and test the algorithm that you designed for Exercise 15 of Chapter 1. (You may assume that the value of . In your program, declare a named constant PI to store this value.)The program in the Programming Example: Fibonacci Number does not check whether the first number entered by the user is less than or equal to the second number and whether both the numbers are non-negative. Also, the program does not check whether the user entered a valid value for the position of the desired number in the Fibonacci sequence. Rewrite that program so that it checks for these things.
- In C, Given an int variable n that has already been declared, write some code that repeatedly reads a value into n until at last a number between 1 and 10 (inclusive) has been entered.a and b are int variables containing values, and a < b.Write a for loop that prints all odd numbers from a to b (both inclusive).(Example: if a=25, b=82, then it will print 25 27 29 .... 79 81)Write only the for loop with its block, nothing else. with java1 # Write a program that reads a single integer N from the user. 2 # It then prints the string: "Is N your favorite number?"