Q2/ Write a program in the Fortran language to read 10 numbers and find the sum of the numbers that are divisible by 5 without the remainder
Q: Q2: Write C++ program to read two integer numbers, and read theoperation to perform on these numbers
A: I have used the four operations(+,-,*,/) here. Algorithm : Step 1 : declare variables. Step 2 : ask…
Q: Write a program in C to add two complex numbers.
A: Required: Write a program in C to add two complex numbers.
Q: 3. Rewrite the following code segment using a multiple-selection statement in the following…
A: Required:
Q: Programming language: C++ Read two distinct integers x, y and print "Increasing Order" if two…
A: Write a program in C++ language to read two distinct integers x, y and print "Increasing Order" if…
Q: Q3: Write a computer program in FORTRAN 90 to input the coordinates (x and y) of n points. The…
A: To find if n points lie in the second quarter or not. For a point to lie in second quater, its x…
Q: 1.Write all permutation for ABC. (Consider as a letter A, B,C). (PYTHON)
A: Note: Answering the first question as per the guidelines. Input : String: ABC Output : All…
Q: 4- In one of the projects, it is required to determine the cubes whose compressive strength limits…
A: check the step 2 for programme
Q: Q18: Write a program in C++ to find the area of a circle.
A: #include <iostream> using namespace std; int main(){ float area,r; cout<<"Enter…
Q: Q2 - Write a program by FORTRAN90 language to find the value of 'y'from the following equations: 3…
A: Step 1:- Program Approach:- 1.Declare the variable x and y as real data type 2.Take the input…
Q: Q3: b-Write a program in (Fortran 95) to find the value of W from the following equations. If X is…
A: We need to write a Fortran 95 code for the given scenario.
Q: 3. Write a C++ to read three numbers and sorts them in descending order.
A: As per guidelines we are supposed to answer only one question. Kindly repost other questions as a…
Q: Q1) write C++ program to find the product of odd values that can be divided by 13 between -40 and n,…
A: Please find the code and output below
Q: Q2 / Write a program in C++ to calculate the remaining volume by placing a hard ball inside a cube…
A: The logic behind finding remaining volume: Volume of cube = (length)3 The ball is a sphere So volume…
Q: Q1 )Write a C program using switch. The program reads one character c. Then it reads one integer…
A: 1) Below is C program reads c and m and according to c calculate value of r using switch statement…
Q: Q2/ Write a program in the Fortran language to read 10 numbers and find the sum of the numbers that…
A: Algorithm: 1. Start 2. Read 10 numbers in an array. 3. Declare s 4. Using for loop traverse…
Q: Q1/ Write a program in C++ that reads 15 numbers and calculates and prints the sum of every three…
A: We will print sum of 3 consecutive numbers in an array and also average of them using if condition
Q: HW2: Write a computer a program in Fortran 90 to find the value of Z (x). Use format statement to…
A: the solution is an given below :
Q: Q3/B/ Write a program in C++ to read an integer number then find the area or circumference of a…
A: Since Algorithm is already given in the problem, I am not writing it. Program: #include…
Q: Q2\ Write a complete C++ program that shows the following output for a different number of rows…
A: We can use a simple for loop to solve this problem which will loop from 0 to n-1, where n is the…
Q: Generate 10 numbers in the range [1,10] and find the frequency of the number 5 among the random…
A: Generating random numbers in C++ uses rand() function. The rand() function is in the <cstdlib>…
Q: 4. Evaluate the following postfix expression. 355* + 5 7 + 6 / - The value of the above postfix…
A: The value of the postfix expression is a) 26 Steps are explained below
Q: z3+z?+4 Q1 / If y where z is from (1-10) write a 4 Fortran program to print odd values of y only
A: Create a FORTRAN program with the name user wants. For example, Program Hello is created. And, then…
Q: / Write a program in C++ to find the sum of the series: z = n=15
A: #include <bits/stdc++.h>using namespace std;int main(){ int x,y,n,k=1;…
Q: Question 5: Write a program that inputs four strings that represent floating-point values, converts…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED C FOR THE SOLUTION Define header…
Q: write a c++ program to calculate the value of y, where: y=((3x)^n)/n using pointer
A: * is dereferencing pointer to get the value stored in a pointer
Q: 3. Write a program to calculates the sum, and an average of the values of your student ID number,…
A: The problem is based on finding the sum and average of the given student id. NOTE: The result is…
Q: Q1: Write a program in Fortran language to calculate the first 20. terms of the following series X x…
A: ANSWER:-
Q: 4. Using the machine language introduced in the class, write a program that multiplies the numbers…
A: program of multiplication of matricies:
Q: only Q7 in python 7. Write a program to print swapping of two numbers without using third variable.
A: Start Input two number call swap method swap (x,y): x=x+y…
Q: 4. Write a program that displays the following table. Cast floating point numbers into integers. a b…
A: The given problem is related to programming language where the program will print the value of a, b…
Q: Q/ Write a program in FORTRAN to calculate the value of Y,then display the result on screen, where:…
A: The program reads the value of x using read *, x The conditional if-else-endif statement should be…
Q: HW1: Write a program in Fortran 90 to find average three integers numbers, and then display the…
A: According to the asked question, the solution is given below with a proper explanation.
Q: - Q1 /B: Write a program in c++ to print even numbers and odd numbers?... اكتب برنامج بلغة سي بلس…
A: required: Write a c++ program to print if a number is even or odd. Required code with comments…
Q: Q1. Write a program in C++ language to obtain the equation below, for values of x from (1-20), by…
A: We will run the for loop from x = 1 to x = 20. Then we will calculate Y. And print the value of Y.…
Q: Write program in C++ to read 8 numbers and find summation and avarega
A: #include <iostream>using namespace std; int main(){ int n, i; float num[100], sum=0.0,…
Q: Q.1/I write a program in C ++ that reads 15 numbers and calculates and prints the sum of every three…
A: Please give postive ratings for my efforts. Thanks. PROGRAM #include<bits/stdc++.h>using…
Q: 5. The period of a pendulum is given by the formula L P = 2 n g 1 sin - where g = 980 cm/s? L=…
A: Algorithm: Start Initialize g to 980 and pi to 3.1415927 Iterate through the loop from n=1 to n=5…
Q: Writea C++ code (using a function) to read an integer value time (T) and convert it to equivalent…
A: Q1. Algorithm Start int time, min, hour Print("Enter time") Accept time hour=time/60…
Q: Q3: Write a FORTRAN program that reads three integer numbers and finds and prints the maximum.
A: Program: INTEGER a, b, c, maxi PRINT*, 'Enter the three numbers:' READ*, a, b, c IF (a .GE. b…
Q: Q6/ write a number anc or nositive h
A: Code: #include<iostream>using namespace std; // function declarationvoid check(double); //…
Q: ite a program to print all the number from which the given number is completely divisible. You have…
A: Required: Write a program to print all the number from which the given number is completely…
Q: Q.1/ Write a FORTRAN 90 program to print and sum all the numbers between 10 and 1000 that divided by…
A: let us see the code for the above question:-
Q: Q2 - Write a program by FORTRAN90 language to find the value of 'y ' from the following equations:…
A: Step 1:- Program Approach:- 1.Declare the variable x and y as real data type 2.Take the input from…
Q: Q6: Write a program to find and print the value of (f) from the following cquations for Fourteen…
A: Since no programming language is mentioned, I am using python. Algorithm: Start Read the value of θ…
Q: Write a program in C to display the cube of the number up to given an integer.
A: #include<stdio.h> int main() { int number, cube; printf(" \n Please Enter any integer…
Q: 2. Write a program in C to calculate power of a number using a recursive function.
A: - We need to code a program to calculate power of a number using recursion. We need to use C…
Q: C++ Exercise 30 defines the number e and Exercise 31 shows how to approximate the value of e using…
A: #include <iostream> using namespace std; float cal(int i, int n) { if(i == n) return ((i-1) +…
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: int i, n; // initialize first and second terms int t1 = 0, t2 = 1; // initialize the next term (3rd…
A: Converting following c program into MIPS instructions
Q: Write a program in C ++ to generate 35 random numbers between 1 and then print each 7 numbers on one…
A: Please find the answer below :
Step by step
Solved in 2 steps with 1 images
- Q2/ Write a program in the Fortran language to read 10 numbers and find the sum of the numbers that are divisible by 5 without the remainder قراءة 10 ارقام ثم ايجاد مجموع الارقام التي تقبل القسمه على 5 بدون باقي(##### solve this with in 15 mins###### Question: 1A Special Number is a number when the sum of the factorial of digits is equal to the original number (given number). For example, 145 is a Special Number because 145 = 1! + 4! + 5!.Your task is to write a Python code that takes some numbers as user input (separated by a comma) in a single line and groups the Special & Non-Special numbers in a dictionary. Note that the values corresponding to the keys in that dictionary must be in tuple format.Sample Input 1:145, 346, 2, 83221, 7999888Sample Output 1:{'Special': (145, 2), 'Non-Special': (346, 83221, 7999888 )}-----------------------------------------------------------------Sample Input 2:1431, 69716, 353, 7969828Sample Output 2:{'Special': (), 'Non-Special': (1431, 69716, 353, 7969828)}A Palindromic prime is a prime number that is also a palindromic number. Write a C++ program that displays all the palindromic prime numbers between 100 and 999 without using pointers.For example: These are 14 palindromic prime numbers smaller than 500:2,3,5,7,11,101,131,151,181,191,313,353,373,383.
- Three numbersa. Write a program that reads three numbers and prints “all the same” if they are allthe same, “all different” if they are all different, and “neither” otherwise.b. Write a program that reads three numbers and prints “increasing” if they are inincreasing order, “decreasing” if they are in decreasing order, and “neither”otherwise. Here, “increasing” means “strictly increasing”, with each value largerthan its predecessor. The sequence 3 4 4 would not be considered increasing.c. Repeat part b. but before reading the numbers, ask the user whetherincreasing/decreasing should be “strict” or “lenient”. In lenient mode, thesequence 3 4 4 is increasing and the sequence 4 4 4 is both increasing anddecreasing/*code Kth Largest Factor A positive integer d is said to be a factor of another positive integer N if when N is divided by d, the remainder obtained is zero. For example, for number 12, there are 6 factors 1, 2, 3, 4, 6, 12. Every positive integer k has at least two factors, 1 and the number k itself.Given two positive integers N and k, write a program to print the kth largest factor of N. Input Format: The input is a comma-separated list of positive integer pairs (N, k). Output Format: The kth highest factor of N. If N does not have k factors, the output should be 1. Constraints: 1<N<10000000000 1<k<600. You can assume that N will have no prime factors which are larger than 13..C Programming Write a program that reads an integer from the user (keyboard), namely n. Yourprogram should print all positive numbers that are smaller than n and whosedigits sum up to a perfect square number.(An integer is a perfect square if it hasan integer square-root for example 25) You should print the numbers in ascendingorder and print their digits separated by “:“ symbol from the least significant digitto the most significant digit on the same line as the number. At the end of eachline you should also print the sum of the digits of the number. Example:If the user enters n : 30, then the output should be as follows:1 1 14 4 49 9 910 0:1 113 3:1 418 8:1 922 2:2 427 7:2 9
- Rewrite the following code segment using a multiple selection statement in JavaQuestion 2 A number in base 2 (binary) is a number such that each of its digits is O or 1. To convert from binary to decimal (base 10), the digits starting from the right are multiplied by powers of 2 (starting at 0) and added. For example, the value in decimal of 10011 is calculated as follows: Write a program that reads from the user a 5-digit integer representing a value in binary and displays its equivalent value in decimal. Note that if the user enters an integer which digits are other than 0 or 1, the program displays a message stating that the number is invalid. Sample Run 1: Enter a 5-digit integer made of Os and 1s: 10011 10011 in decimal is 19 Sample Run 2: Enter a 5-digit integer made of Os and ls: 13001 13001 is not validIn 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.
- In Python print_pattern() prints 5 characters. Call print_pattern() twice to print 10 characters. Example output: ***** *****Create a program in C language that calculates the month's day from a given year and year's day. Use pointers for the month and month's day variables. Don't forget to add proper errors handling in your program. Example or errors - Invalid Input- Invalid year- Invalid year day Example of input # ./month_day <year> <yearday> # Example for Feb 2nd, 2019:\$ ./month-day 2019 33Feb 02, 2019 I have this class - month-day.c - #include <stdio.h> /* month_day function's prototype*/void month_day(int year, int yearday, int *pmonth, int *pday); int main() {return 0;} Note: I don't need the calendar, please read the instructions well!!#Solve it with C programing Mr. X is a student of Computer Science. He is facing a problem and needs your help to solve it.The problem is, you will be given N integer numbers( 4<n<=100) which are arranged side by side (x1,x2,x3,x4,.....).Now you have to sort those items in ascending order. After doing this , your job is to print the items in a sorted way and find the median.[NB: when N is odd , Median= (N+1)/2; When N is even Median= (N/2)+1 ] Sample Input: 74 7 11 2 9 3 5Sample Output:2 3 4 5 7 9 115