JSFiddle - React, Tailwind, and code Playground
by velmurugansp
JavaScript
/*
// #01 https://blog.kodegod.com/programs-on-decision-control-structures/write-a-program-to-accept-two-number-and-print-largest-among-them-in-c-language/
var a, b;
console.log("Enter numbers : ");
a = 50;
b = 30;
if(a > b){
console.log("Largest value is: ", a);
}
else{
console.log("Largest value is", b);
}
*/
// #02 Program to check whether number is divisible by 5
// https://blog.kodegod.com/learn-programming/write-a-program-to-accept-a-number-from-user-and-print-if-it-is-divisible-by-5-in-c-language/
var n;
n = 521;
if(n%5 == 0){
console.log(n + " is divisible by 5.");
}
else{
console.log(n + " is not divisible by 5.");
}