Computer Science, asked by shrushtiraval25, 10 months ago

Write A program to print A series 1,3,5,7up to n in C program

Answers

Answered by Karthikrikky12
2

HELLO MATE

#include<stdio.h>

#include<conio.h>

void main()

{

int i,num;

printf("Enter the last number:");

scanf("%d",&num);

for(i=1;i<=num;i=i+2)

{

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

}

getch();

}

HOPE THIS HELPS YOU

PLEASE FOLLOW ME ✌️

MARK ME AS BRAINLIST

Answered by Soñador
0

Answer:

#include<iostream.h>

#include<conio.h>

void main()

{

clrscr();

int n;

cout<<"\nEnter n";

cin>>n;

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

{

cout<<i<<"\t";

}

getch();

}

Similar questions