JSFiddle - React, Tailwind, and code Playground

by velmurugansp

JavaScript

// #01 Write A Program To Accept Two Number And Print Largest Among Them In C Language

/*
var a,b;

a = 50;
b = 80;

if( a > b) {
	console.log("Largest value is ",a);
}

else{
	console.log("Largest value is",b);
}

*/ 

// #02 Program to check number is positive or not
// link: https://blog.kodegod.com/learn-programming/write-a-program-to-accept-a-number-and-print-if-the-number-is-positivenegative-in-c-language/

var a,b;

a = 1;

if( a > 0){
	console.log("The given number is positive",a);
}

else{
	console.log("The given number is negative ",a);
}