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
Leno4ka [110]
1 year ago
11

Write an algorithm to calculate the sum of number between 1 to 100​

Computers and Technology
2 answers:
mart [117]1 year ago
7 0

Algorithm

STEP 1: START.

STEP 2: DEFINE n, i, j.

STEP 3: SET sum =0.

STEP 4: SET n =100.

STEP 5: REPEAT STEP 6 to STEP 10 UNTIL i<=n.

STEP 6: REPEAT STEP 7 and STEP 8 UNTIL j<=i/2.

STEP 7: if i%j ==0.

STEP 8: sum =sum + j.Algorithm

STEP 1: START.

STEP 2: DEFINE n, i, j.

STEP 3: SET sum =0.

STEP 4: SET n =100.

STEP 5: REPEAT STEP 6 to STEP 10 UNTIL i<=n.

STEP 6: REPEAT STEP 7 and STEP 8 UNTIL j<=i/2.

STEP 7: if i%j ==0.

STEP 8: sum =sum + j.

natulia [17]1 year ago
5 0



DECLARE sum : REAL
DECLARE count : INTEGER
sum = 0

FOR count






You might be interested in
When you are almost done with your soup and want to get at the last little bit, how should you do this 2
pav-90 [236]

Answer:

<u>B. Tip the bowl slightly, then spoon up the last bit</u>

Explanation:

Generally speaking none of the other answers made much of sense.. "tip the bowl from side to side" doesn't help you at all, neither does "Keep spooning as much as you can, then stop eating". Neither of these will help you spoon up the last little bit, <u>the most logical answer is B. "Tip the bowl slightly, then spoon up the last bit"</u>. If this is not the correct answer then it'd be D, but I don't believe/feel that it's "poor etiquette" to "leave the last little bit".

7 0
2 years ago
Determine whether or not the following pairs of predicates are unifiable. If they are, give the most-general unifier and show th
Evgen [1.6K]

Answer:

a) P(B,A,B), P(x,y,z)

=> P(B,A,B) , P(B,A,B}  

Hence, most general unifier = {x/B , y/A , z/B }.

b. P(x,x), Q(A,A)  

No mgu exists for this expression as any substitution will not make P(x,x), Q(A, A) equal as one function is of P and the other is of Q.

c. Older(Father(y),y), Older(Father(x),John)

Thus , mgu ={ y/x , x/John }.

d) Q(G(y,z),G(z,y)), Q(G(x,x),G(A,B))

=> Q(G(x,x),G(x,x)), Q(G(x,x),G(A,B))  

This is not unifiable as x cannot be bound for both A and B.

e) P(f(x), x, g(x)), P(f(y), A, z)    

=> P(f(A), A, g(A)), P(f(A), A, g(A))  

Thus , mgu = {x/y, z/y , y/A }.

Explanation:  

Unification: Any substitution that makes two expressions equal is called a unifier.  

a) P(B,A,B), P(x,y,z)  

Use { x/B}  

=> P(B,A,B) , P(B,y,z)  

Now use {y/A}  

=> P(B,A,B) , P(B,A,z)  

Now, use {z/B}  

=> P(B,A,B) , P(B,A,B}  

Hence, most general unifier = {x/B , y/A , z/B }  

b. P(x,x), Q(A,A)  

No mgu exists for this expression as any substitution will not make P(x,x), Q(A, A) equal as one function is of P and the other is of Q  

c. Older(Father(y),y), Older(Father(x),John)  

Use {y/x}  

=> Older(Father(x),x), Older(Father(x),John)  

Now use { x/John }  

=> Older(Father(John), John), Older(Father(John), John)  

Thus , mgu ={ y/x , x/John }  

d) Q(G(y,z),G(z,y)), Q(G(x,x),G(A,B))  

Use { y/x }  

=> Q(G(x,z),G(z,x)), Q(G(x,x),G(A,B))

Use {z/x}  

=> Q(G(x,x),G(x,x)), Q(G(x,x),G(A,B))  

This is not unifiable as x cannot be bound for both A and B  

e) P(f(x), x, g(x)), P(f(y), A, z)  

Use {x/y}  

=> P(f(y), y, g(y)), P(f(y), A, z)  

Now use {z/g(y)}  

P(f(y), y, g(y)), P(f(y), A, g(y))  

Now use {y/A}  

=> P(f(A), A, g(A)), P(f(A), A, g(A))  

Thus , mgu = {x/y, z/y , y/A }.

7 0
3 years ago
Jenny needs to record the names of 30 students, write down the subjects they studied, and note their grades in each subject afte
lidiya [134]

Answer:

<em>The </em><em>answer </em><em>is </em><em>(</em><em>A)</em>

Explanation:

Double-click both the worksheet tabs one at a time and then enter the new names.

6 0
2 years ago
Chat messages are most likely to be found where on a computer? firewall nic internet history ram
miv72 [106K]
<span>The answer is RAM.  Chat messages are most likely to be found in the RAM of the computer.  It is Random Access Memory.  </span><span>RAM is considered volatile memory, which means that the stored information is lost when there is no more power.</span>
3 0
2 years ago
Which website citation is correctly formatted according to MLA standards?
inysia [295]

Answer:

<em><u>The</u></em><em><u> </u></em><em><u>answer</u></em><em><u> </u></em><em><u>is</u></em><em><u> </u></em><em><u>C</u></em><em><u> </u></em><em><u>no</u></em>

Explanation:

<em><u>Hope</u></em><em><u> </u></em><em><u>it</u></em><em><u> </u></em><em><u>will</u></em><em><u> </u></em><em><u>help</u></em><em><u> </u></em><em><u>you</u></em><em><u> </u></em><em><u>dear</u></em><em><u> </u></em><em><u /></em>

7 0
1 year ago
Read 2 more answers
Other questions:
  • The length of a hailstone sequence is the number of terms it contains. For example, the hailstone sequence in example 1 (5, 16,
    9·1 answer
  • What can you do with someone's ip address?
    9·1 answer
  • Why is a networked system a benefit?
    7·1 answer
  • ________ is a model of computing in computer processing, storage, software, and other services which are provided as a shared po
    9·1 answer
  • Differences between electromechanical era and electronic era in point.<br>PLZ HELP​
    6·1 answer
  • How Can I add a image in an HTML program?​ please tell
    6·1 answer
  • Tommy loves taking care of homing pigeons. He sent a note to his crush who lives 24.0 km away from his house. These birds fly at
    9·1 answer
  • Can i eat chicken and you shut
    14·2 answers
  • A computer is the __________ of an attack when it is used to conduct an attack against another computer.
    11·1 answer
  • **HELP ME PLS**
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!