How to print series(7,5,8,6,9..)in c program. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

How to print series(7,5,8,6,9..)in c program.

6th Sep 2019, 2:41 AM
Adhithya.J
Adhithya.J - avatar
3 Answers
0
What is the pattern even?
6th Sep 2019, 4:13 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
int a=7,b=5,i,n; scanf("%d",&n); printf("%d %d",a,b); for(i=3;i<=n;i++) { if((i%2)==1) { a=a+1; printf("%d",a); } else { b=b+1; printf("%d",b); } }
4th Dec 2019, 7:52 AM
Harsha Vardhan
Harsha Vardhan - avatar
0
(7% (5//52)
26th Dec 2020, 3:30 PM
شهریار بابایی
شهریار بابایی - avatar