1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tresset_1 [31]
3 years ago
11

What is the benefit of using the AND logical function instead of the IF function?

Computers and Technology
1 answer:
masya89 [10]3 years ago
3 0

Answer:

Determines True if both conditions are met

Explanation:

If both inputs are true then the output is true, if one is false then it becomes false, if both are false it is also false

You might be interested in
g Write a program that prompts the user for an integer n between 1 and 100. If the number is outside the range, it prints an err
grin007 [14]

Answer:

The cpp program is given below.

#include<iostream>

#include<iomanip>

using namespace std;

int main() {

   

   // variables declared

   int n;

   int sum=0;

   float avg;

   

   do

   {

       // user input taken for number    

       cout<< "Enter a number between 1 and 100 (inclusive): ";

       cin>>n;

       

       if(n<1 || n>100)

           cout<<" Number is out of range. Enter valid number."<<endl;

       

   }while(n<1 || n>100);

   

   cout<<" "<<endl;

   

   // printing even numbers between num and 50  

   for(int num=1; num<=n; num++)

   {

       sum = sum + num;

   }

   

   avg = sum/n;

   

   // displaying sum and average

   cout<<"Sum of numbers between 1 and "<<n<<" is "<<sum<<endl;

   cout<<"Average of numbers between 1 and "<<n<<" is ";

   printf("%.2f", avg);

   

       return 0;

}

OUTPUT

Enter a number between 1 and 100 (inclusive): 123

Number is out of range. Enter valid number.

Enter a number between 1 and 100 (inclusive): 56

 

Sum of numbers between 1 and 56 is 1596

Average of numbers between 1 and 56 is 28.00

Explanation:

The program is explained below.

1. Two integer variables are declared to hold the number, n, and to hold the sum of numbers from 1 to n, sum. The variable sum is initialized to 0.

2. One float variable, avg, is declared to hold average of numbers from 1 to n.

3. User input is taken for n inside do-while loop. The loop executes till user enters value between 1 and 100. Otherwise, error message is printed.

4. The for loop executes over variable num, which runs from 1 to user-entered value of n.

5. Inside for loop, all the values of num are added to sum.

sum = sum + num;

6. Outside for loop, average is computed and stored in avg.

avg = sum/n;

7. The average is printed with two numbers after decimal using the following code.

printf("%.2f", avg);

8. The program ends with return statement.

9. All the code is written inside main() and no classes are involved.

3 0
3 years ago
What is the purpose of the fit to size feature in Word?
Olegator [25]

Answer : computer

Explanation:

please mark me as brilliant

3 0
3 years ago
Anyone here codes? <br> C++, C#, Lua? Anything?
Travka [436]

Answer:

IxxyzjgzkgzjgKfzkg v

jvljcljxkhxkgg/gjhkggzkykzkgjzjgggggzjgcufxu

Explanation:

nk yxthzefhGghghrhgzxhhsdgchiixxu

7 0
3 years ago
Read 2 more answers
What does Boot Partition mean?
lukranit [14]

Answer:The system partition and the boot partition are computing terms for disk partitions of a hard disk drive or solid-state drive that must exist and be properly configured for a computer to operate. There are two different definitions for these terms: the common definition and the Microsoft definition. - Wikipedia.

Explanation:

8 0
4 years ago
What is the extension of excel worksheet​
muminat

Answer:

Excel file formats

Format Extension

Excel Workbook .xlsx

Excel Macro-Enabled Workbook (code) .xlsm

Excel Binary Workbook .xlsb

Template .xltx

7 0
2 years ago
Other questions:
  • People often delete or read email based upon the subject line alone select one:
    10·2 answers
  • Enter the answer.
    11·2 answers
  • This morning when Paul turned on his computer at work, it would not boot. Instead, Paul reported that he heard a loud clicking n
    6·1 answer
  • What will be the values of ans, x, and y after the following statements are executed? int ans = 35, x = 50, y =50; if ( x &gt;=
    7·2 answers
  • Stephanie would like to know the average number of regular hours worked by her employees. In cell B11, create a formula using th
    8·1 answer
  • Question 2 of 3
    7·2 answers
  • What are the main features cyber law of Nepal​
    13·1 answer
  • Write a recursive function num_eights that takes a positive integer pos and returns the number of times the digit 8 appears in p
    8·1 answer
  • What steps can be used to password-protect a worksheet?
    14·1 answer
  • Javed’s teacher tells him she would like to see him improve his speaking skills in the next debate by including a rhetorical app
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!