Advertisement
Angga_Wahyu

Program C++ Fungsi Rekursif

Oct 14th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std ;
  3. int main(){
  4. int x,y,z,total=0;
  5. cout<<"bilangan : ";
  6. cin>>x;
  7.     for (y = 21;y<=21;y++);
  8.     for (z = 21;z<=x*21;z=z+21){
  9.         cout<<z<<" ";
  10.         total=total+z;
  11.         }
  12.         cout<<endl;
  13.         cout<<"total : "<<total;
  14. return 0 ;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement