#include<iostream>
using namespace std;
int main()
{
int upper_Limit=0,i;
cout<<“Enter the upper Limit: “;
cin>>upper_Limit;
int multiple=1;
for(i=0;i<upper_Limit;i++)
{
if(multiple<=upper_Limit)
{
cout<<multiple<<“\t”;
multiple=multiple*3;
}
}
}