Online course
Online course
Write the code which will display 51 if variable x has value 1, 52 if variable x has value 2, 53 if variable x has value 3.
int x;
cin>>x;
if(x==1) cout<<5;
else if(x==2) cout<<5*5;
else if(x==3) cout<<5*5*5;
else cout<<”undefined value”;