akbarbasya26

cpp odd even

Jan 6th, 2020
106
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data