Advertisement
joaquinflorespalao

vecotr modificable

May 19th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. // Example program
  2. #include <iostream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. void notas(){
  8.  
  9. short n;
  10.  
  11. cout<<"Ingrese n: ";cin >> n ;cout<< endl;
  12.  
  13.  
  14. float* Notas= new float [n];
  15.  
  16. for(short a=0; a<n;a++){
  17. cin >> Notas[ a ];
  18. }
  19. *(Notas+1)=-7;
  20.  
  21. for(short a=0; a<n;a++){
  22. cout << "La nota es: "<< Notas[ a ]<< endl;
  23. }
  24.  
  25. delete[] Notas;
  26. }
  27.  
  28. int main()
  29. {
  30. notas();
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement