Control Statement 1

Description:

C++ program to display integer from 1 to n except 6 and 9. "n" is the input number Test Case 1 Input (stdin) 11 Expected Output 1 2 3 4 5 7 8 10 11 Test Case 2 Input (stdin) 10 Expected Output 1 2 3 4 5 7 8 10

Program :

#include <iostream>

 using namespace std;

 int main()

{

 int n;

cin>>n;

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

 {

 if ( i == 6 || i == 9)

 {

 continue;

 }

 cout <<i<<"\n";

 }

 return 0;

}