Advertisement
adesuryadi_

AP /Kosasih/n1/1

Mar 10th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <constrea.h>
  2.  
  3. int nilai[5];
  4.  
  5. void bacanilai()
  6. {
  7. for(int i=1; i<=5; i++)
  8. {
  9. cout<<"Bilangan ke-"<<i<<" : ";
  10. cin>>nilai[i];
  11. }
  12. }
  13.  
  14. void cetaknilai()
  15. {
  16. for(int i=1; i<=5; i++)
  17. {
  18. cout<<nilai[i]<<endl;
  19. }
  20. }
  21.  
  22. main()
  23. {
  24. bacanilai();
  25. cout<<endl;
  26. cetaknilai();
  27. getch();
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement