Guest User

Untitled

a guest
Mar 24th, 2020
1,072
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. using namespace std;
  5. int main (){
  6.     int a, b, c;
  7.     a=-1;
  8.      
  9.     cout << "\t\t === Program Bilangan Ganjil Angka 1-20 ===\n"<<endl;
  10.     for (c=1;c<=10;c++)
  11.     {
  12.         b=2+a;
  13.         cout<<b<<" ";
  14.         a=b;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment