Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Example program
- #include <iostream>
- #include <string>
- using namespace std;
- void notas(){
- short n;
- cout<<"Ingrese n: ";cin >> n ;cout<< endl;
- float* Notas= new float [n];
- for(short a=0; a<n;a++){
- cin >> Notas[ a ];
- }
- *(Notas+1)=-7;
- for(short a=0; a<n;a++){
- cout << "La nota es: "<< Notas[ a ]<< endl;
- }
- delete[] Notas;
- }
- void MaximoValor(){
- short n;
- cout<<"Ingrese n: ";cin >> n ;cout<< endl;
- float* Notas= new float [n];
- for(short a=0; a<n;a++){
- cin >> Notas[ a ];
- }
- delete[] Notas;
- }
- void Promedio(){
- short n;
- float Promedio=0;
- cout<<"Ingrese n: ";cin >> n ;cout<< endl;
- float* Notas= new float [n];
- for(short a=0; a<n;a++){
- cin >> Notas[ a ];
- Promedio += Notas[a]/n;
- }cout << "El promredio es: " << Promedio;
- delete[] Notas;
- }
- void Indice_segun_nota(){
- delete[] Notas;
- }
- void Notas_ascendentes(){
- delete[] Notas;
- }
- int main()
- {
- // notas();
- MaximoValor();
- // Promedio();
- Indice_segun_nota();
- Notas_ascendentes();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement