Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdlib.h>
- main()
- {
- double x;
- double *p=(double*)malloc(10*sizeof (double));;
- double t=0;
- int i;
- for( i=0;i<10;i++)
- {
- std::cout <<"enterez un double:";
- std::cin>>x;
- *(p+i)=x;
- }
- for(i=-5;i<5;i++){
- std:: cout<<"L element :"<<5+i<<" est : "<<*(p+5+i)<<"\n";}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement