Q6. Rewrite the following code using switch statement:
if(x>=0 && x<=1) k=5
else if(x>10 &&x<=20) k=12
else if(x>20 && x<=30) k=16
else k=20.
Answers
Answered by
0
Explanation:
The code is for which programming language????
Different language have different restrictions.
as far as Java is concerned this block of code will look like:
Run this on you IDE and check if surves your propose.
Attachments:
![](https://hi-static.z-dn.net/files/dd9/493d2cdedec8898bd33e67147a131b4c.jpg)
Similar questions