a) for (int count = 1; count < 100; count++); 66 66 cout << (10* count) b) int total 75,score=20; total + score: system.println("New Total is"); system.printf("%d,%n,%d%n%d", ++ total, total - - ,total); c) int i = 1; while (i <= 10) { { } if(i==8) break; cout<< i+ 3; itti d) int i,j; for(i=0;i<2;i++) for(j=0;j<=3;j++) { cout<< "Hi": } cout<<<'*'; }
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
![Below is the transcription of the code:
---
**Assume the code below is part of a complete program, what will be the output of the code?**
**a)**
```cpp
for (int count = 1; count < 100; count++);
cout << (10 * count) << “ “;
```
**[Output for section a will be:]**
```
1000
```
**b)**
```cpp
int total=75, score=20;
total += score;
system.println(“New Total is”);
system.printf(“%d,%d,%d%n%d”, ++total, total – –,total);
```
**[Output for section b will be:]**
```
New Total is
96,96,95
```
**c)**
```cpp
int j = 1;
while (j <= 10)
{
if(j==8)
break;
cout<< i+ 3;
i++;
}
```
**[Output for section c will be:]**
```
4 5 6 7 8 9 10
```
**d)**
```cpp
int i,j;
for(i=0;i<2;i++)
{
for(j=0;j<=3;j++)
{
cout<< “Hi”;
}
cout<<“*”;
}
```
**[Output for section d will be:]**
```
HiHiHiHi*HiHiHiHi*
```
---
**Explanation of Code Sections:**
**Section a** uses a `for` loop that iterates from 1 to less than 100. After the loop completes, it prints `10 * count`, which results in `1000`.
**Section b** initializes `total` and `score`, incrementing `total` by `score`. It prints a formatted string using `system.println` and `system.printf`.
**Section c** has a `while` loop from 1 to 10, breaking out when `j` equals 8, and prints incremented values.
**Section d** contains nested `for` loops, inner loop prints “Hi” 4 times followed by “*”, repeating this sequence twice.
Note: The usage of `system.println` and `system.printf` seems incorrect and should be corrected to standard output methods in the actual implementation (e.g., `System.out.println` for Java or `printf` for](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5925ff69-31c7-44aa-97a6-e263d2ad1e72%2F2157272c-98fa-49a9-87bb-2a150508922c%2Fj2f5h1nk_processed.png&w=3840&q=75)

1. In this question the for loop is given with initializing variable name count and conditions are given , the output is -
//Question Number 1
#include <iostream>
using namespace std;
//Main function
int main() {
//for loop with count variable initialized with 1
//loop has condition count smaller than 100 , so loop will run 99 times
for(int count = 1; count <100;count++){
//every time loop will run it will print the value of count multiply by 10 and space
cout<<(10*count)<<" ";
}
return 0;
}
OUTPUT:-
Count has initial value of 1 and condition is count smaller than 100 (so its 99). So loop will run 99 times and every time loop runs it will print the value of count multiply by 10 and space.
Step by step
Solved in 4 steps with 4 images









