Write A program to print A series 1,3,5,7up to n in C program
Answers
Answered by
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
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
Math,
6 months ago
History,
1 year ago
Physics,
1 year ago
English,
1 year ago
Computer Science,
1 year ago