Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- double a[10] = { 1,2,3,4,5,6,7,8,9,10 };
- double t2d[10][10];
- void Display(int n, double *tab) {
- double *granica = tab + n;
- for (double *l_tab = tab ; l_tab < granica; l_tab++)
- {
- cout << *l_tab << " ";
- }
- cout << endl;
- }
- void BackDisplay(int n, double *tab) {
- for (double *l_tab = tab + n -1; l_tab >= tab; l_tab--)
- {
- cout << *l_tab << " ";
- }
- cout << endl;
- }
- void Fill(int n, double *tab) {
- int start = 5;
- for (double *l_tab = tab; l_tab < tab + n; l_tab++)
- {
- *l_tab = start++;
- }
- }
- int main() {
- double *wsk;
- wsk = &t2d[0][0];
- Fill(100, wsk);
- Display(100, wsk);
- BackDisplay(100, wsk);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement