Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

if else to ternary converter online

#include<stdio.h>
int main()
{
	int grade,ans;
	printf("Enter your grade:
");
	scanf("%d",&grade);
			
	ans = (grade<=75?(grade<=100?printf("A."):printf("Fail.")):(grade>=59?(grade<=74?printf("B."):printf("Fail."));));
			
	return 0;						
			
	   
}
 
PREVIOUS NEXT
Tagged: #ternary #converter #online
ADD COMMENT
Topic
Name
2+7 =