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
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
0
Answer:
do while loop she can use
Similar questions
Math,
2 months ago
English,
2 months ago
History,
2 months ago
English,
5 months ago
Accountancy,
11 months ago
Accountancy,
11 months ago
Accountancy,
11 months ago