Write a js program to check whether two given integers, whether one is positive and another is negative.
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: Write a C++ program to find the sum of the series given below: 12 + 22 + 32 + ........... + n2…
A: Write a C++ program to take input value of n and print the sum of the series 12 + 22 + 32 + …… +…
Q: Write a program to ask user to enter any two integers and multiply them if both are even…
A: Program Approach - Define the main function and the variables needed. Prompt user to enter the two…
Q: Write a Program in C++ to read 10 integers from user and find the maximum value of all these 10…
A: Given: 10 integers taken input from user. Requirement: Write a program to find the maximum value of…
Q: Simplify the following expression as much * ? as possible (A+B)C · C + (A + Ã)C
A: Given : Simplify the following expression as much as possible (A+B)C.C' + (A + A')C
Q: 02: Write C++ program to read integer number and print the equivalent string. 0Zero 1 One 2 Two
A: The problem is based on finding interpretation on entering the marks and to find the string…
Q: 2) jis true and i is false, write a F90 program to find: a= .not. j.and. i b= j .xor. i c= i.or. i d…
A: .not. alters the Truth value .xor. can be found by using .neqv. which will return True if both are…
Q: Write a program in R to find the maximum of three numbers
A: Procedure Followed: Read three values from the console and assign them to num1,num2,num3 as…
Q: H.w/ Write a program in the Fortran language to read five numbers and then find the average positive…
A: program TEST read*, A,B,C,D,E sum=A+B+C+D+E avg=sum/5.0 print*,"Average of numbers is",avg…
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: d) Write a C program to print all the multiples of x in the range 1 to y, where X,y are two positive…
A: Coded using C language.
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: Write an Algorithm, and C++ code to Swap two numbers using third variables.(i.e. exchange the values…
A: Note: There are multiple questions are given in one question. According to the rule, you will get…
Q: Write a C++ program to read input an integer from the user and then test whether the number is…
A: Given : Write a C++ program to read input an integer from the user and then test whether the number…
Q: Fortran Write a program to make a divide a number and which at last we had remainder is zero. Both…
A: Requirements :- Approah ;- Simply assuming two integer variable then using / operator we can get…
Q: In C++ Write a program to print first 25 natural numbers with only 5 numbers in one line. Output…
A: Here I have used the concept of nested loops to print the output. I have created an outer loop to…
Q: am which will accept two numbers from the user an
A: Q. Write a pseudo code for a program which will accept two numbers from the user and calculate the…
Q: (a) Write a program in C Langunge to read an integer number (X) to calculate and print Y values,…
A: Note: we are only allowed to solve one question in one post. I am solving the first on here. To get…
Q: Q1) Write a java program to input three real numbers and find the maximum
A: In the java program, if we finding a maximum number in a given number we used to write code using…
Q: Write C++ program to calculate the value of Z where: sin(x)*y if 10>x>=0 2x+y if 20>x>=10 Z=…
A: #include <cmath>#include <iostream>using namespace std; int main(){ int x; int y;…
Q: d) Write a C program to print the values from 21*n to 31*n where n is a positive integer taken input…
A: Write a C program to print the values from 21*n to 31*n where n is a positive integer taken input…
Q: QI: Write C++ program to read two integer numbers then print "multiple" or "not" if one number is a…
A: take two inputs from the user. check if the second number divides the first number using if else…
Q: write C++ program that reads n from the number prints multiples of 3 and finds the sum of the…
A: Explanation: In order to find the multiples of 3, each number should be considered separately, and…
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: Write C++ program to find the summation of the following series: sum =1 +3 + 5+7+ ... + 99 in other…
A: Please find the answer below
Q: Write a program in js to check whether a number is integer or floating point number or not a number
A: Required:- Write a program in js to check whether a number is an integer or floating-point number or…
Q: Write a program in js to check both number is palindrome or not and print the results according…
A: The question wants to know whether the numbers are palindrome or not in JavaScript.
Q: Write a program in C++ to find the sum of only positive numbers out of 10 integers entered using the…
A: Continue statement is used to skip the current iteration of loop without terminating loop…
Q: Write a C program to read two floating point numbersL and M from the console. Find and display the…
A: Import necessary header files. The user is prompted to enter two values which are stored in…
Q: Write a program in JAVA language to accept 10 integers from the user and print the maximum and…
A: logic:- define an array of size 10 use for loop from i=0 to i<10 to take ten integer values and…
Q: Simplify the following expression as much * ? as possible (A+ B)C · C + (A + Ā)C
A: Answer: (A+B)C.C'+(A+A')C = C
Q: Write a C++ program that receive two integer values from the user. The program then should print the…
A: Please find the answer below :
Q: d) Write a program in Perl programming language to find the sum of natural numbers from 1 to 50 and…
A: As given, I need to write a program to find the sum of natural numbers from 1 to 50 in Perl…
Q: Write C program to calculate A value from the equation below. Then, round it to the nearest integer…
A: C round() function: round( ) function in C returns the nearest integer value of the…
Q: Write a program to display the sum of digits of every palindromic number from m to n. Input of m and…
A: A palindrome number is a number which remains same after reversing its digits. A single digit number…
Q: Write C++ program to take input an integer value from user and print number of digits in that number
A: Initialise a variable digits=0 and then run a loop having condition of number>0. Inside loop body…
Q: Use if - else - elif Write a program to get an integer input from the user. If the input is 10, read…
A: Please find the answer below :
Q: Type a C ++ program to read N number of the correct type and print your disbelievers each number
A: C++ Program for above : #include <iostream> using namespace std; int main() { //read…
Q: write a program c++ ( use if or switch ) which read a number of 3 digits and check if (units, tens,…
A: Program Approach - Include the essential header files as per code requirements. Define the main…
Q: Write a C program to read 3 real numbers, then find their sum and display the result. After that,…
A: #include<stdio.h>int main(){ // declare variable float num1, num2, num3; float sum; //…
Q: 3- Write a program C++to read a sequence of integers (n), then print the number of the positive and…
A: #include <iostream>//header fileusing namespace std;void find_positive_negative_count(int…
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 c++ program to Read two integers from the user (x, y) where x is less than y Generate a random…
A: While doing programming in any programming language, you need to use various variables to store…
Q: 1) For the following program: a=6.3; ..(a) ; b=7; c=a+b; , the result will be: ans=13.
A: Note: we are only allowed to solve one question in one post. I am solving the first on here. To get…
Q: Write C++ program, to read Al n. n1 of numbers, then put 10 instedd each even positive number.
A: Algorithm: Start Read N Set I=0 While I<N: Set J=0 While J<N: Read A[I][J]…
Q: Write a program to take input 10 integers and check whether those 10 integers contain at least one…
A: Any number greater than 99 will be 3 digit number and this is what we check Use a string to store…
Q: Write a js program to check whether two given integers, whether one is positive and another is…
A: function positivendnegative(a, b){ if ((a < 0 && b > 0) || a > 0 && b <…
Q: Write a C program to calculate the value of y as following: (n is a real number given by user) 5 2i…
A: Program Description: To write a C program to calculate the value of y as follows: (n is a real…
Q: Write a C++ program to take integers as input from user until the sum of all those numbers becomes…
A: #include<iostream>using namespace std; int main(){ int sum=0; int number; int count =0;…
Step by step
Solved in 2 steps with 2 images
- What is the simplified function of F(A, B) = Em(1,3)? * Ā. B а. b. А А. В С. d. Buse c++ program A positive integer n is called prime if n > 1 and the only factors of n are 1 and n. It is known that a positive integer n > 1 is prime if n is not divisible by any prime integer m≤√n . The 1230th prime number is 10,007. Let t be an integer such that 2 ≤ t ≤ 100,000,000. Then t is prime if either t is equal to one of the first 1,230 prime numbers or t is not divisible by any of the first 1,230 prime numbers. Write a program that declares an array of size 1,230 and stores the first 1,230 prime numbers in this array. The program then uses the first 1,230 prime numbers to determine if a number between 2 and 100,000,000 is prime. If a number is not prime, then output at least one of its prime factors.Use C++ codingA “Perfect” number is a positive whole number that is the sum of its proper divisors(including 1 and excluding the number itself). For example, the proper divisors of 6 are 1,2, 3 and 1 + 2 + 3 = 6. So, 6 is a perfect number. Similarly, 28 is also a perfect number.Write a program that displays first 5 perfect numbers. The program should be composedof at least two functions additional to main function, one that accepts a number andreturns a Boolean true if the number is perfect and false otherwise. The other functionshould display all the proper divisors of the perfect number.SAMPLE RUN:Six is a perfect number 1+2+3=628 is a perfect number1+2+4+7+14=28
- Wrie a program in js to find the factorial of a number and the number may be positive, negative or zero. Handle all thisplease code in python Find the Error The following function takes in a positive integer and returns True if the integer is divisible by at least one integer between 2 and 7, inclusive, or False otherwise. Or at least, that’s what it’s supposed to do; there is a logic error that causes it to fail (for example, it should return True when passed in 15, but it returns False instead). Find the error and fix it. If you’re working in a pair, make sure that both of you are able to explain the error to your TA. Hints: As with most logic errors, the first thing you should do is put in print statements. Print out what i is at each step of the loop. At what point can you safely return False (that is, how many values of i do you have to check before you can be sure num isn't divisible by any of them)? def div27(num): for i in range(2,8): if num % i == 0: return True else: return FalseUsing Java The majority() function takes three boolean arguments and returns true if two (or more) of the arguments are true; and false otherwise. Complete two implementations of majority() below by filling in the letter of one of the expressions below in each provided space. You may use each letter once, more than once, or not at all (but you may not use any other code). A. false G. x && y H. x && z I. y && z J. x && y && z K. x || y B. true C. X D.y E. Z L.x || Z M. y || z N. x || y || z O. count++ wwwmmin P. count- Q. count R. count = 2
- Q3, A lecturer intends to separate his students into 2 groups based on their INDEX Numbers, those with odd numbers in group A and EVEN numbers in B. Use if-else statement to implement this. Q4.Your son intends to randomly mention some numbers to you, write a program using While or do-whileloop that will print all the numbers and the sum of the positive numbers.Write a program to check the divisibility of two numbers. Use the concept of default argument here. If the number is not divisible, check whether the first number is a prime or not, using the previously defined divisibility check function.Please help me find the C CODE for this problem. Thank you! 1. "Even" Now by CodeChum Admin I'm really fond of even numbers, you know? That's why I'll be letting you make another even number problem yet again. This time, you need to print from a range of two inputted numbers, n1 and n2 (inclusive), all the even numbers from n2 down to n1, in descending order. Input 1. Value of n1 Description The first integer of the range Constraints The value of n1 is guaranteed to be lesser than or equal to n2. Sample 3 2. Value of n2 Description The second integer of the range Constraints The value of n2 is guaranteed to be greater than or equal to n1. Sample 10 Output The first line will contain a message prompt to input the value of n1. The second line will contain a message prompt to input the value of n2. The next line will contain all the even numbers from n2 down to n1. Enter value of n1: 3 Enter value of n2: 10 10 8 6 4
- ZAIN IQ .all zain IQ الدراسة - الشعبة : * الصباحيه / هاء Write and test the following average () function that returns the average of up to three negative numbers: double average (int x1, float x2 and float ?x 3) * إضافة ملف إرسال عدم إرسال كلمات المرور عبر نماذج Go ogle مطلقا۔ لم يتم إنشاء هذا المحتوي ولا اعتماده من قبل Go ogle. الإبلاغ عن إساءة الاستخدام - شروط الخدمة - سياسة الخصوصية Google &ilajWrite a function that returns the average of the digits in the even places in an integer using the following header: double avgOfEvenPlaces(int n)Write a c++ code using if else that takes two integers as input representing a month and day and prints the season forthat month and day. Assume that months are specified as an integer between 1 and 12 (1 for January, 2for February, and so on) and that the day of the month is a number between 1 and 31. If the date fallsbetween 16/12 and 15/3, you should print "Winter". If the date falls between 16/3 and 15/6, you shouldprint "Spring". If the date falls between 16/6 and 15/9, you should print "Summer". And if the date fallsbetween 16/9 and 15/12, you should print "Fall".