This question has been answered
Question

write program that prompts the user to enter two integers. The program

outputs how many numbers are multiples of 3 and how many numbers are multiples of 5 between the two integers (inclusive). by using following structure
int main ()
{   
   int num1, num2;
   int multiple3Count = 0;
   int multiple5Count = 0;
   int temp;
...
...
...
while (temp <= num2)
{
     if (temp % 3 == 0)
           multiple3Count++;
...
...
...
...
}
   cout << "Multiples of 3 between " << num1
        << " and " << num2 << ": " << multiple3Count << endl;
...
...
return 0;
}

Answered by Expert Tutors
Step-by-step explanation
1 Attachment
Capture.PNG
PNG
write program that prompts the user to enter two integers. The program outputs how many numbers are multiples of 3 and how many numbers are multiples...
Get unstuck

321,403 students got unstuck by Course
Hero in the last week

step by step solutions

Our Expert Tutors provide step by step solutions to help you excel in your courses