If-Else to a Switch Statement
I'm trying to rewrite these If-Else Statements into a Switch statement. the problem is i have the >= in the If-Else and everywhere i look. the switch statement corresponds to ==.
if (N >= 90)
G = 'A';
else if (N>=80)
G = 'B';
else if (N>=70)
G = 'C';
else if (N>=60)
G = 'D';
G = 'F';
Can't be done - this is the situation where you use the if statement.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL