ITC Lab 6.0 Graded Lab

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Graded Task

Use While or Do while loop only

Write a program in which the user enters two numbers X and Y and your program prints all the
numbers that divide by 3 and 5 between X and Y.
Plus Find the sum of these numbers

Expected Output

Enter 1st number: 3


Enter 2nd number: 14
Number divisible by 3 and 5 are: 3 5 6 9 10 12
Sum = 45

Enter 1st number:11


Enter 2nd number:2
Number divisible by 3 and 5 are: 3 5 6 9 10
Sum = 24

You might also like