The input is X ( X is a decimal number ,which is belongs to {0, 0.5, 1, 1.5, 2, .., MAX})
The output should be a string that consists of "FS","HS","FE" (represents full star, half star, full empty)
X Can be any decimal number ( multiples of 0.5 )
MAX Can be any number.
Examples:
if user gives input as 1.5, 5 , then output should be "FS,HS,FE,FE,FE" (which means fullstar,half star, full empty, full empty,full empty)
if user gives input as 0 , 5 , then output should be "FE,FE,FE,FE,FE" (which means five full emptys)
if user gives input as 3 , 5 then output should be "FS,FS,FS,FE,FE" (which denotes 3 fullstars , 2emptys ) pls provide me code..
Sorry, but that's OUR line. We need to see the code you've written to accomplish your objective. Then, if it's not working correctly, we help correct it, but we don't write it for you.
Show some effort.
As a start, X cannot be a decimal. Those are whole numbers. You'll need a double.