- 1

C program to print sequence 2,9,16,23....n

9th Sep 2021, 5:52 AM
Yash Anilrao Kitey
Yash Anilrao Kitey - avatar
3 Answers
+ 2
Ever considered using a for loop?
9th Sep 2021, 5:59 AM
Tim
Tim - avatar
0
#include <stdio.h> int main() { const int N = 30; int i=2; for(;i<N;i+=7) printf("%d ", i); }
9th Sep 2021, 6:22 PM
Gigi