C++

RANGAN M.

asked • 09/29/20

I want to print the no. of contents inside the count please check the description for more details

#include <iostream>

#include <vector>


using namespace std;


int main()

{

vector<int> vec {1,3,5,15,16,17,18,19,20,21,25,26,27,30,50,55,56,58,100,200,300,400,500,600,700};

//---- WRITE YOUR CODE BELOW THIS LINE----

int count=0;

for(auto division:vec){

if(division%5==0||division%3==0){

count=division;

cout<<count<<endl;


};

};

cout<<sizeof(count) <<endl;

return 0;


}

at end of this it is showing 4 why???????????

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.