3- Write a program to read a sequence of integers (n), then print the number of the positive and negative numbers.
Q: In Python write a program to read input a binary string and finds the difference in the count of '0'…
A: Write a program in Python to read input a binary string and find the difference in the count of '0'…
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: f) Prompt the user to enter a string s and an integer n. Write a program to add n spaces in starting…
A: Given : An integer n and a string s taken input from user. Requirement: Write a program in C++…
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: 1- Write a program to find the average of 50 numbers and print the result. 2- Write a program to…
A: program for average of 50 number : #include <iostream> using namespace std; int main() {…
Q: 1: Volume.cpp) Write a program that reads a radius and prints the volume and surface area of the…
A: Input Radius Calculate Surface Area and display it Calculate Volume and display it
Q: 1- Write a program to read a sequence of number (n), then print the times repeat of a specific…
A: Required: A program to find how many times a number is repeated in a sequence. Required code with…
Q: 3- Write a program to print the days of the week when we enter its number
A: Module VBModule Sub Main()dim n as integer = System.console.readline() select case n case 1…
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: 17. Write a program that calculates and print the numbers (from 0 to 10) and it squares and cubes.
A: Mathematically we know that square of a number is its multiplication by itself. For example if n is…
Q: 10. Write a program that computes the sum: 7 k! R = -2 + k
A: code :- import mathvalue = 0.0 def factorialofvalue(n): return 1 if (n==1 or n==0) else n *…
Q: c++ Given two sequences with n integers between 0 and 9, interpreted as two n-digit integers,…
A:
Q: Q4. Write a program to read a 10 number and calculate if it is prime or not?
A: As there is no programming language mentioned so i attempted this program in c++ In program user…
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: 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: Write a program that prompts the user to enter three integers and display the integers in…
A: Given:
Q: The purpose of the following program is c = 0; k= 1; m= [ 6 7 11 4 12]; while k<=length(m) d=…
A: Here we have variable c initialized to 0 and k initialized to 1. In the loop, we have calculated the…
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: 13. Write a program that reads in two integers and determines and prints if the first is a factorial…
A: Required: A program to read two integers and check if the first is a factorial of the second or not.…
Q: 1. Write a program that lets the user guess whether a randomly generated integer would be even or…
A: Algorithm / steps : Generate the random number Ask the user guess for even or odd Incase…
Q: 1- Write a program that read N of number. Check if number 3 is existing in the numbers read?
A: I give the code in Python along with the output and code screenshot
Q: 1. Write a program that will swap two numbers by just using two variables only. You need to ask for…
A: Given: Programming: C#
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: Complete the following program so that it prints the odd numbers from 3 through 501 inclusive. for i…
A: Here is the complete code with some modifications for space and a statement to find the odd number.…
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: 5. Write a program to find the of x where : x = 2*A+ 3*B -10
A: Required: A program to solve the given equation. Required code with comments for explanation and…
Q: 2. Generate a random string of length 10 that contains only lowercase alphabets from 'a' to 'z'.…
A: Since the programming language is not mentioned so I have used the C++ programming language.…
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: 1: Volume.cpp) Write a program that reads a radius and prints the volume and surface area of the…
A: #include <iostream>using namespace std;int main() { float radius,volume,surface_area;…
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: Q1: Let n and m be any positive integers. Write a program to calculate п т T = i=0 j=0
A: The program is written in C Language. Check the program screenshot for the correct indentation.…
Q: 3- Given S= 1 + 3! 5! ,correct the following program which describes the series S,. 7! 9! S=2; m=1;…
A: Error in the above program: Variable S's initial value should be 1 instead of 2. f = f*i will…
Q: 1- Write a program to compute the value of y: y = 1+++ 3 25 .+ Where 3 49
A: As per our guidelines, we are supposed to answer only one question. Kindly repost the remaining…
Q: ?write a program to read 4 numbers and find the sum and average إجابتك
A: Since no programming language is mentioned, I am using python Algorithm: Start Read 4 numbers…
Q: 9.Write program to print all the numbers divisible by 4 and 5 up to a number of N(entered by user…
A: I have given an answer in step 2.
Q: Q6: Write a program to find value of (U, 0 and p).
A: Program code provide below makes use of two header files. One for the standard input and output and…
Q: 1. Write a program to print Prime numbers
A: Given:-
Q: 3. Write a program to add the following numbers and save the result in R20. Ох25, 0х 19, Ох12
A: Given: Write a program to add the following numbers and save the resut in R20. Given numbers:…
Q: Complete the following program so that it prints the odd numbers from 3 through 501 inclusive. for i…
A: Ans: Code: for i in range(3, 501+1, 2): print(i)
Q: Q3- Write a program to find the circumference and the area of square its side x
A: Step 1: Prompt and accept the side of the square. Step 2: Find the circumference of the square by…
Q: 2. Write a program to find the Greatest Common Divisor (GCD) of two numbers.
A: Here I have defined the function named gcd(). This function takes 2 numbers as input parameters and…
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: 4- Write a Program to calculate the electromagnetic force between two electrons placed (in vacuum)…
A: Given: Charge of an electron q = 1.6*10-19C Distance between the electrons = 2*10-13 m K= 9*109 The…
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;…
Step by step
Solved in 3 steps with 1 images
- Q1: Write a program that reads 10 numbers and then finds the largest number and prints it and finds the smallest number and ey1. Write an algorithm that asks the user to enter ten numbers and then prints the largest one.2. Write an algorithm that asks the user to enter a positive integer n and prints the sum of the divisors of n."QUICK-BASIC64 Write an algorithm that finds and prints the sum of the first N terms of the series 1,4,7,10,... for a given integer N>0. (Please explain everything the program in details and please check whether the program runs or not by using q-basic64. Thank you so much)"
- 1 # Write a program that reads a single integer N from the user. 2 # It then prints the string: "Is N your favorite number?"PYTHON PROGRAMMING !)Write a program to display all the numbers which are divisible by 13 but not by 3 between 100 and 500.(exclude both numbers) b) Write a program to print the following series till n terms.2 , 22 , 222 , 2222 _ _ _ _ _ n terms c) Write a program to find the sum of the following series(accept values of x and n from user): 1 + x/1! + x^2/2! + ……….x^n/n!3 - Write a program in C ++ to generate 35 random numbers between 1 and then print each 7 numbers on one line. (use srnad ())
- 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 progra4. Write a program that prints all the composers in the list['Rzewski', 'Ruggles', 'Carter', 'Stockhausen','Stravinsky']whose name has at least 10 characters.>>> ========================= RESTART=========================>>>StockhausenStravinskyA Fibonacci sequence is a sequence of numbers where each successivenumber is the sum of the previous two. The classic Fibonacci sequencebegins: 1, 1, 2, 3, 5, 8, 13, .... Write a program that computes the nthFibonacci number where n is a value input by the user. For example, ifn = 6, then the result is 8.