Computer Science, asked by gayathririti, 6 months ago

Write a program to accept m and n(m<n) and perform the following based on the user's
choice.
a) To display all the unique numbers from m to n. A number is a unique number
if it either ends with 3 or is divisible by 3. Eg:- 13,15,27,33, etc.
b) To display the count of multiples of 5 from m to n.​

Answers

Answered by heyysaurabh
1

Answer:

#include<iostream.h>

#include<conio.h>

void main()

{

int m, n ;

cout<<"Choose A range between two numbers";

cin>>m, n;

int t=m;

cout<<"Unique Numbers -" ;

while(m<n)

{

if( m%10 = 3)

cout<<m;

else if(m%3 = 0)

cout<<m;

m++;

cout<<endl;

}

cout<<"No. of mutiples of 5 between the rangle \n";

int c=0;

while(t<n)

{

if(t%5=0)

c++;

}

cout<<c;

getch()

}

Similar questions