question5 - cout<<arr[k]<<endl } return arr }...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #include <iostream> using namespace std int arr[6] { n =6 for (int k=0 k<n k++) { if (k==0) arr[k]=1 else e arr[k]=arr[k-1]+k+1
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout<<arr[k]<<endl } return arr } int main() { int m int *ptr = computeSums(m) for(int i=0 i<m i++) { cout<<(ptr[i])<<" " } }...
View Full Document

This note was uploaded on 04/12/2009 for the course CS 31 taught by Professor Melkanoff during the Winter '00 term at UCLA.

Ask a homework question - tutors are online