Friday, July 29, 2022

Fever Checker in TypeScript

 Machine Problem

Write a program that will check if the given patients temperature of 41 degrees Celsius and would display on screen if he/she has fever depending whether his/her temperature exceeds 39 degrees Celsius. If it is less than that, then the patient has normal temperature. Using if-else statement.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing


/* fever_checker.ts
   Jake Rodriguez Pomperada, MAED-IT, MIT
   www.jakerpomperada.com and www.jakerpomperada.blogspot.com
   jakerpomperada@gmail.com
   July 21, 2022    8:52 PM    Thursday
   Bacolod City, Negros Occidental
*/

var body_temp : number = 38;
var result_one : string = "";
var result_two : string = "";

// It the patients body temperature less than (<) 39
// degrees celsius then the patient does not a fever.

if (body_temp < 39) {
  result_one = "The patient's body temperature of " +body_temp + " degrees Celsius.\n";
  result_two = "You don't have a fever!\n";
} else
// It the patients body temperature greater than or equal (>=)
// degrees celsius then the patient does not a fever.
{
result_one = "The patient's body temperature of " +body_temp + " degrees Celsius.\n";
result_two = "You have a fever!\n";
}

console.log();
console.log("\tFever Checker in TypeScript\n");
console.log(result_one);
console.log(result_two);
console.log("\tEnd of Program\n");


No comments:

Post a Comment