Advertisement
akbarbasya26

cpp odd even

Jan 6th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. int i, j, n, a=2;
  7. for(i=1; i<=6; i++){
  8. for(j=1; j<=i; j++){
  9. cout << a <<" ";
  10. a += 2;
  11. }
  12. cout<<endl;
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement