Computer Science, asked by monikaelumalai2000, 5 hours ago

#include int main() { int count = 60; int i, j, k = 8; for (i = 1, j = 1;i< k && j int main() { int count =60; int i, j, k = 8; for ( i=1, j=1; i< k&& j#include <stdio.h>

int main()
{
int count =60;
int i, j, k = 8;
for ( i=1, j=1; i< k&& j<k; i++)
{
if (i== 4)
{
i=0;
j++;
}
count = count-1;
}
printf("%d", count);
return 0;
}
}

Answers

Answered by manepallinages14
1

Answer:

32

Explanation:

initially i=1,j=1,k=8,count=60;

when ever i value reaches 4 then j is incremented by 1 i<k is always true but after 7 times of increment of j becomes 8.so the loop executed for 4*7=28  

answer=60-28=32.

Answered by mindfulmaisel
4

32 is the correct answer

Explanation:

  • Firstly the values of “i”, “j”, “k”, and “count” were initialized as 1,1,8 and 60.
  • As soon as “i” reaches the numeric value of 4, the loop inverts, and  i*k becomes True.
  • But, after incrementing the value of “j” 7 times, it becomes 8,
  • So, the corresponding loop then executes a total of 28.  
  • the result we get after this will be 32 (i.e. 60-28=32).

hence,32 is the correct answer

Similar questions