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
Maru [420]
2 years ago
13

Write a pseudo code to print sum of all even numbers from 1 to 100

Computers and Technology
1 answer:
Vinil7 [7]2 years ago
5 0

(python) Answer:

sum = 0

for i in range 1 to 101:

 if i modulo 2 == 0:

   sum += i

print(sum)

Explanation:

first we declare the sum variable

then go through all numbers 1 through 100 (range 1 to 101 because python range does not include the last number - if we did 1 to 100 it would look at 1 to 99)

if the number is even (divide by 2, check if there's a remainder, if not it's even and we will add the number to the sum

finally print the sum

You might be interested in
Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicatin
lyudmila [28]

Answer:

Following is the program in C language :

#include <stdio.h> // header file

#define n 5 //  macro

int main() main function

{

   int a[n],k1; // variable and array declaration

   printf("Enter the element:\n");

   for(k1=0;k1<n;++k1) //iterating the loop

   {

       scanf("%d",&a[k1]);//Read the values by user

   }

   printf("Output in Reverse Order:\n");

   for(k1=n-1;k1>=0;--k1)//iterating the loop

   {

   printf(" %d ",a[k1]); //Display the values

   }

   return 0;

}

Output:

Enter the element:

4

3

45

67

89

Output in Reverse Order: 89 67 45 3 4

Explanation:

Following is the description of the program

  • Define a macro "n" with value 5 after the header file.
  • Declared an array "a" and defined the size of that array by macro i.e "n".
  • Read the value by the user by using scanf statement in the array "a"
  • Finally In the last for loop display the values of array "a" by space.

7 0
3 years ago
Which of the following is not part of the four ways you can avoid problems with email communication?
UkoKoshka [18]
D you can always find another way or other ways to relay your message 

hope this helps ya :)


3 0
2 years ago
Which of the following cannot be created using Word software?
Arturiano [62]
3-database of new clients
7 0
3 years ago
The basic difference between RAM and ROM memory is: Question 5 options: A) RAM is nonvolatile while ROM is volatile. B) RAM is r
schepotkina [342]

The basic difference between RAM and ROM memory is RAM is read/write while ROM Is read-only.

Explanation:

  • A ROM, non-volatile memory, does not use to store data, but RAM is volatile and requires power to store data.
  • ROM is not given usually as a specification, but RAM is typically specified when buying a computer.
  • We can write data only once in ROM. However, once it is written, we can read it any number of times. RAM is the main memory in a computer, and read from and write to it much faster than other storage types. RAM is used to store files in use on the computer.

Hence the basic difference between RAM and ROM memory is RAM is read/write while ROM Is read-only.

6 0
3 years ago
Explain an application software​
dedylja [7]

Answer:

application software refers to the programs or series of instructions that allows us to do specific type of task on a personal computer examples word processing programs, spreadsheet programs, presentation programs among others

6 0
2 years ago
Other questions:
  • Which of these is a weakness of written communication?
    8·1 answer
  • What is an independent data mart?
    8·1 answer
  • By using the search functionality within a twitter stream, users can filter for:
    9·1 answer
  • . If you have written the following source code:
    9·1 answer
  • 2. What is a cap? (0.5 points)
    9·1 answer
  • The area of a square is stored in a double variable named area. write an expression whose value is length of the diagonal of the
    8·1 answer
  • It's fill the gap homework
    7·1 answer
  • How does the Evaluate Formula dialog box help fix errors?
    9·2 answers
  • Which of the following statements is true of San serif fonts?
    12·2 answers
  • Who is katie and why is she deleting my answers
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!