Computer Science, asked by SiddhiVinayak15, 5 months ago

Kritika is trying to create a series of odd numbers 1,3,5,7.... upto 10 terms but she is not able to do so.Suggest her the appropriate command that can meet her rrequirment.In c++.

Answers

Answered by nisha263248
2

Answer:

#include<stdio.h>

int main()

{

 int i, N;

 printf("Enter N:");

 scanf("%d", &N);

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

 {

  printf("%d",i);

 

  //Logic avoid last , 

  if(i!=N)

   printf(", ");

 }

 return 0; }

Explanation:

int N=5;

Output:-1,2,3,4,5

Answered by vps220922511
0

Answer:

do while loop she can use

Similar questions