First commit
This commit is contained in:
22
IUT/Info1/TD/Exercices/pointeur1/main.cpp
Normal file
22
IUT/Info1/TD/Exercices/pointeur1/main.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "fonction.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
|
||||
unsigned int n;
|
||||
cout << "Saisir le nombre de réels à stocker" << endl;
|
||||
cin >> n;
|
||||
|
||||
float* p = new float[n];
|
||||
|
||||
for (unsigned int i = 0; i < n; i++) {
|
||||
*(p+i) = i;
|
||||
}
|
||||
|
||||
Affiche_réels(p, n);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user