Computer Science, asked by Mukeshtamta, 10 months ago

Rewrite the following code using while loop:

for a in(2,7,2):
for b in(1,a):
print(b,end='$')
print()

Answers

Answered by ama789238
1

Explanation:

#include <stdio.h>

int main ()

{

int n, i;

scanf ("%d", &n);

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

{

if(i%2==0)

{

printf ("%d\n",i);

}

else

printf ("-1");

}

Similar questions