how to do this
Loop program 42,-49,56,-63,70,-77
Answers
Answered by
1
Answer:
Explanation:
int j=42;
for(int i=1;i<=6;i++)
{
if(i%2!=0)
System.out.print(j);
else
System.out.print("-"+j);
j+=7;
}
Answered by
0
Answer:
10 CLS
20 FOR I = 6 TO 11 STEP 1
30 IF I MOD 2=0 THEN PRINT 7*I ELSE PRINT -7*2
40 NEXT I
50 END
RUN>-1
Similar questions