Answer:
for (char i='a'; i<='e'; i++){
for (char j='a'; j<='e'; j++){
cout << i<< j<< "\n";
}
}
Explanation:
The loop runs all characters from the inner while the outer holds one character, by doing so, a will be matched with a,b,c,... Like wise b,c,d,... and on it goes.
Answer:
B - TRUE
Explanation:
The points where budget lines are tangent to indifference curves are used to derive the demand curve, which helps to identifies the combination of goods yielding the highest total utility.
The compiler translates each source code instruction into the appropriate machine language instruction, an
Answer:
- You need to create a variable outside (before) the input loop.
- You need a variable inside your loop that temporarily holds the user input.
- In your loop, you will compare if the variable outside the loop is greater than (or less than) the new user input.
I don't know what program language you are using, but I will use python since it's easy to read and you will get the idea if you're using a different programming language.
<u>Code (Python)</u>
largestnum = 0
for x in range(6): <em>#loops 6 times</em>
newnum = int(input("Enter a number: ")) #ask user for input & converts to int.
if newnum > largestnum: <em>#if new number is greater than largest num </em>
largestnum = newnum <em>#make it the largest number</em>
<em> </em>print("Largest:", largestnum)
The reason why you need a variable outside of the loop is because after the loop is done all variables inside the loop are trashed and can no longer be accessed outside of the loop.