Lab2Q2.cpp - #include <iostream> using namespace std void printArray(int arr int size for(int i= 0 i< size i cout<arr[i]<\\t cout<endl int main const int

Lab2Q2.cpp - #include <iostream> using namespace std void...

This preview shows page 1 out of 1 page.

#include <iostream> using namespace std; void printArray(int arr[], int size){ for (int i= 0; i< size; i++) cout<<arr[i]<<"\t"; cout<<endl; } int main(){ const int little = 6, medium = 10; int k, number[medium]; for (k = 0; k < medium; k= k + 1) number[k] = k / 2; cout << "a.\t"; printArray(number, medium); for (k = 0; k < little; k++)
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Spring '17

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture