In the following program segment i, j, m, and n are integer variables. The values of m
Question:
for i : = 1 to m do
for j : = 1 to n do
if i ≠ j then
print i + j
How many times is the print statement in the segment executed when
(a) m = 10, n = 10;
(b) m = 20, n = 20;
(c) m = 10, n = 20;
(d) m = 20, n = 10?
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 55% (9 reviews)
a 10 2 10 90 ...View the full answer
Answered By
Muhammad Umair
I have done job as Embedded System Engineer for just four months but after it i have decided to open my own lab and to work on projects that i can launch my own product in market. I work on different softwares like Proteus, Mikroc to program Embedded Systems. My basic work is on Embedded Systems. I have skills in Autocad, Proteus, C++, C programming and i love to share these skills to other to enhance my knowledge too.
3.50+
1+ Reviews
10+ Question Solved
Related Book For
Discrete and Combinatorial Mathematics An Applied Introduction
ISBN: 978-0201726343
5th edition
Authors: Ralph P. Grimaldi
Question Posted:
Students also viewed these Linear Algebra questions
-
In the following program segment, i, j, k, and counter are integer variables. Determine the value that the variable counter will have after the segment is executed. counter : = 10 for i := 1 to 15 do...
-
(a) Determine the value of the integer variable counter after execution of the following program segment. (Here i, j, and k are integer variables.) counter : = 0 for i := 1 to 12 do counter : =...
-
How many times is the print statement executed for the following program segment? (Here, i, j, k, and m are integer variables.) for i : = 1 to 20 do for j : = 1 to i do for k : = 1 to j do for m : =...
-
According to Electronic Designs 2012 Engineering Salary Survey, the mean base salary of a software engineering manager is $126,417the highest mean among all types of engineers. In contrast, a...
-
The time from when a patient is discharged from North Shore Hospital to the time the discharged patients bed is ready to be assigned to a new patient is referred to as the bed assignment turnaround...
-
Discuss each of the needs in order within Maslows Need Hierarchy Theory.
-
How did this affect how you think of yourself as a communicator? How did this affect your awareness of your body language?(pp. 102103)
-
Padre, Inc., buys 80 percent of the outstanding common stock of Sierra Corporation on January 1, 2018, for $802,720 cash. At the acquisition date, Sierra's total fair value, including the...
-
Ammer Products tiene un saldo promedio de cuentas por pagar de $850,000 y su costo anual de bienes vendidos es de $8,750,000. Suponga que hay 365 das por ao. Cul es el perodo de diferimiento de las...
-
Jimmy owns a garden in which he has planted N trees in a row. After a few years, the trees have grown up and now they have different heights. Jimmy pays much attention to the aesthetics of his...
-
The integer variables m and n are assigned the values 3 and 8, respectively, during the execution of a program (written in pseudocode). Each of the following successive statements is then encountered...
-
After baking a pie for the two nieces and two nephews who are visiting her, Aunt Nellie leaves the pie on her kitchen table to cool. Then she drives to the mall to close her boutique for the day....
-
Show how you would use the Friedel-Crafts acylation, Clemmensen reduction, and or Gatterman-Koch synthesis to prepare the following compounds: (a) (b) (c) (d) p-methoxybenzaldehyde (e)...
-
Tristan Walker of Walker & Company says, "We are only going to design, develop, and test products and services uniquely tailored to our community's needs. I get it. I'm a part of the community we are...
-
Ace Cosmetics Corporation purchased land adjacent to its plant to improve access for trucks making deliveries. Expenditures incurred in purchasing the land were as follows: purchase price, $55,000;...
-
7. At this point you now know information about both the horizontal and the vertical components of the projectile's velocity. In the space below, draw a diagram of the vector components of Vx and...
-
Complete autonomy in how you demonstrate the following criteria. In this module, we talked more about leadership. We discussed the differences between leadership theory which is a well-substantiated...
-
Accustart Ltd. acquired 38% of the common shares of Lecce Ltd. on January 1, 2024, by paying $5.76 million for 144,000 shares. Lecce declared a cash dividend of $0.60 per share in each quarter that...
-
Several months ago, an investor sold 100 units of a one-year European call option on a nondividend-paying stock. She immediately delta-hedged the commitment with shares of the stock, but has not ever...
-
Why is a help desk and production support critical to system implementations? Discuss its interrelationship with the problem management and reporting system.
-
Mamie has 66 ft of fencing with which to enclose a rectangular dog pen. The side of her garage forms one side of the pen. Suppose the side of the pen parallel to the garage is x feet long. (a)...
-
A container firm is designing an open-top rectangular box, with a square base, that will hold 108 in3. Let x = the length of a side of the base. (a) Express the surface area as a function of x. (b)...
-
Graph each of the following. (a) (b) x for x s -4 x1, forx-4 for x2, for-2 s xs 2, Vx-1, for x > 2
-
THIS IS ONE QUESTION WITH TWO PARTS. PLEASE ANSWER COMPLETELY AND SHOW ALL WORK. (NO EXCEL) Information for Question 1: State Probability Retum on A Return on B Return on C Retum on Portfolio X Boom...
-
Direct materials (5.0 Ibs. @ $5.00 per Ib.) Direct labor (2.0 hrs. @ $13.00 per hr.) Overhead (2.0 hrs. @ $18.50 per hr.) Total standard cost $25.00 26.00 37.00 $88.00 The predetermined overhead rate...
-
Problem 1-28 (Algo) (LO 1-4, 1-5, 1-6b 1-7) Harper, Inc., acquires 40 percent of the outstanding voting stock of Kinman Company on January 1, 2020, for $316,100 in cash. The book value of Kinman's...
Study smarter with the SolutionInn App