Computer Science, asked by shravanipullipelly, 18 days ago

1. Integer i, j, k,n 2. Set j=1, k=1 3. for(each i from 1 to 5) 4. print k 5. j=j+1 k=k+1 6. 7. end for Ops: A. 136 10 15 B. 11235 C 0 1 2 3 4 5 0 2 4 6 8 10 de for​

Answers

Answered by dehariyavikram01
2

Answer:

1 3 6 10 15

Explanation:

Integer i, j, k, n

2) Set j=1, k=1

3) For (each i from 1 to 5)              for i=1          | i=2          | i=3           | i=4

4) print k     this is answer line      print k =1      | k=3         | k=6         | k=10

5) j=j+1                                               j=1+1=2      | j=2+1=3   | j=3+1=4

6) k=k+j                                        k=1+(now)2=3 | k=3+3=6 | k=6+4=10

7) End-for

Answered by nafibarli789
0

Answer:

The program is as follows:

#include <bits/stdc++.h>

using namespace std;

int main()

{ int i, j, k ;

k=6;

for ( int i=1 ; i<=1 ; i++)

{

for ( int j=i ; j<=1 ; j++)

{

cout <<k+1;

]

}

return 0;

}

Explanation:

#include <bits/stdc++. h> exists an execution file for a precompiled header. But in contests, utilizing this file exists a good idea, when you want to decrease the time wasted doing chores; specifically when your rank exists time-sensitive.

For instance to utilize sqrt( ) function, in <bits/stdc++.h> header file we require not have to write < cmath > header file in the code.

#include <bits/stdc++.h>

using namespace std;

int main()

{

count << sqrt(25);

return 0 ;

}

The program is as follows:

#include <bits/stdc++.h>

using namespace std;

int main()

{ int i, j, k ;

k=6;

for ( int i=1 ; i<=1 ; i++)

{

for ( int j=i ; j<=1 ; j++)

{

cout <<k+1;

]

}

return 0;

}

#SPJ2

Similar questions