Thursday, November 19, 2020

Largest of Three Numbers in C

 In this tutorial I will show to how to write a C program to ask the user to give three numbers and then the program will check which of the three numbers has a largest numerical value and display the results on the screen.

 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.





Program Listing


/* largest_number.c 

   Mr. Jake Rodriguez Pomperada,MAED-IT,MIT

   November 19, 2020

   www.jakerpomperada.blogspot.com / www.jakerpomperada.com

   jakerpomperada@gmail.com

*/


#include <stdio.h>


int main() {


    int num1=0, num2=0, num3=0;

    int largest = 0;

    

    printf("\n");

    printf("\tLarget of Three Numbers in C");

    printf("\n\n");

printf("\n\tGive First Value  : ");

    scanf("%d",&num1);

    printf("\n\tGive Second Value : ");

    scanf("%d",&num2);

    printf("\n\tGive Third Value : ");

    scanf("%d",&num3);

    

    

    if (num1 >= num2) {

        if (num1 >= num3)

            largest = num1;

        else

            largest = num3;

    } else {

    if (num2 >= num3)

         largest = num2;

        else

         largest = num3;

    }


   printf("\n\n");

   printf("\tThe largest number is %d.",largest);

   printf("\n\n");

   printf("\tEnd of Program");

   printf("\n\n");

}

Wednesday, November 18, 2020

Finding the Biggest Number in PHP

Finding the Biggest Number in PHP

 In this tutorial, I will show you how to write a program to ask the user to give three numbers and then the program will determine which of three numbers is the biggest value using PHP programming language.

 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.




Program Listing

index.php

<!DOCTYPE html>


<html lang="en">


<head>


     <meta charset="UTF-8">


     <meta name="viewport" content="width=device-width, initial-scale=1.0">


     <title>Finding the Biggest Number in PHP</title>




     <style>


          body {


               background: #f1f1f1;


               font-family: arial;


               size : 16px;




          }


          form {


               background-color: rgba(0, 0, 0, 0.7);


               color: #000;


               padding: 50px;


               position: absolute;


               -webkit-transform: translate(-50%, -50%);


               transform: translate(-50%, -50%);


               left: 50%;


               top: 50%;


          }


          .row {


               display: block;


               font-size: 0;


               margin-bottom: 18px;


          }


          h1,h2 {


               color: #fefefe;


               text-align: center;


               margin: 0 0 40px 0;


          }


          .row label {


               width: 180px;


               color: #fefefe;


               text-transform: uppercase;


               padding-left: 0!important;


          }


          .row input,


          .row textarea {


               background-color: #fefefe;


               width: 280px;


               color: #000000;


          }


          .row textarea {


               resize: none;


          }


          .row label,


          .row input,


          .row textarea {


               vertical-align: top;


               display: inline-block;


               border: 0;


               margin: 0;


               padding: 15px;


               font-size: 15px;


          }


          form button {


               background-color: #16222A;


               width: 250px;


               display: inline-block;


               border: 0;


               padding: 15px;


               color: #fefefe;


               font-size: 15px;


               text-transform: uppercase;


               cursor: pointer;


          }


          form #btnClear {


               background-color: #486980;


          }


          input:focus,


          select:focus,


          textarea:focus,


          button:focus {


               outline: none;


          }


     </style>


</head>


<body>


     <?php


    error_reporting(0);



     $num1 = $_POST['txtFirstNum'];


     $num2 = $_POST['txtSecondNum'];


     $num3 = $_POST['txtThirdNum'];

    


  function biggest($x, $y, $z) {

    

    if(($x > $y) && ($x > $z)) 

    $bigger = $x;

  else if($y > $z) 

    $bigger = $y;

  else

    $bigger = $z;

    return ($bigger);

  }


    if(isset($_POST['submit'])) {


              

       $results = biggest($num1,$num2,$num3);             


      }




     if(isset($_POST['clear'])) {


       $num1 = "";

       $num2 = "";

       $num3 = "";

       $result = "";

  


      }


    


    ?>  




     <form action="" method="post">


          <h1>FINDING THE BIGGEST NUMBER IN PHP</h1>


          <div class="row">


               <label for="txtFirstNum">Give First Number</label>


               <input type="text" name="txtFirstNum" 


                value="<?php echo $num1; ?>" autofocus>>


          </div>


          <div class="row">


               <label for="txtSecondNum">Give Second Number</label>


               <input type="text" name="txtSecondNum"


               value="<?php echo $num2; ?>">>


          </div>


         

      <div class="row">


               <label for="txtSecondNum">Give Third Number</label>


               <input type="text" name="txtThirdNum" 


               value="<?php echo $num3; ?>">>


          </div>


         

        <div class="row">


              <label for="txtBiggest">The Biggest Number</label>


               <input type="text" name="txtBiggest" 


               value="<?php echo $results; ?>" readonly>


          </div>


          

         

              <div classs="row">


               <button type="submit" name="submit" 


               id="btnCompute">Compute</button>


               <button type="submit" name="clear"


                id="btnClear">Clear</button>


          </div>


     </form>


</body>


</html>

Finding the Smallest Number in PHP

Finding the Smallest Number in PHP

  In this tutorial, I will show you how to write a program to ask the user to give three

 numbers and then the program will determine which of three number is the smallest

 value using PHP programming language.


 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 in 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.




Program Listing

index.php

<!DOCTYPE html>


<html lang="en">


<head>


     <meta charset="UTF-8">


     <meta name="viewport" content="width=device-width, initial-scale=1.0">


     <title>Finding the Smallest Number in PHP</title>




     <style>


          body {


               background: #f1f1f1;


               font-family: arial;


               size : 16px;




          }


          form {


               background-color: rgba(0, 0, 0, 0.7);


               color: #000;


               padding: 50px;


               position: absolute;


               -webkit-transform: translate(-50%, -50%);


               transform: translate(-50%, -50%);


               left: 50%;


               top: 50%;


          }


          .row {


               display: block;


               font-size: 0;


               margin-bottom: 18px;


          }


          h1,h2 {


               color: #fefefe;


               text-align: center;


               margin: 0 0 40px 0;


          }


          .row label {


               width: 180px;


               color: #fefefe;


               text-transform: uppercase;


               padding-left: 0!important;


          }


          .row input,


          .row textarea {


               background-color: #fefefe;


               width: 280px;


               color: #000000;


          }


          .row textarea {


               resize: none;


          }


          .row label,


          .row input,


          .row textarea {


               vertical-align: top;


               display: inline-block;


               border: 0;


               margin: 0;


               padding: 15px;


               font-size: 15px;


          }


          form button {


               background-color: #16222A;


               width: 250px;


               display: inline-block;


               border: 0;


               padding: 15px;


               color: #fefefe;


               font-size: 15px;


               text-transform: uppercase;


               cursor: pointer;


          }


          form #btnClear {


               background-color: #486980;


          }


          input:focus,


          select:focus,


          textarea:focus,


          button:focus {


               outline: none;


          }


     </style>


</head>


<body>


     <?php


    error_reporting(0);



     $num1 = $_POST['txtFirstNum'];


     $num2 = $_POST['txtSecondNum'];


     $num3 = $_POST['txtThirdNum'];

    


  function smallest($x, $y, $z) {

    $min = $x;

    if ($x <= $y && $x <= $z)

      {$min = $x;}

    if ($y <= $x && $y <= $z)

      {$min = $y;}

    if ($z <= $x && $z <= $y)

      {$min = $z;}

    $check =  $min;

    return ($check);

  }


    if(isset($_POST['submit'])) {


              

       $results = smallest($num1,$num2,$num3);             


      }




     if(isset($_POST['clear'])) {


       $num1 = "";

       $num2 = "";

       $num3 = "";

       $result = "";

  


      }


    


    ?>  




     <form action="" method="post">


          <h1>FINDING THE SMALLEST NUMBER IN PHP</h1>


          <div class="row">


               <label for="txtFirstNum">Give First Number</label>


               <input type="text" name="txtFirstNum" 


                value="<?php echo $num1; ?>" autofocus>>


          </div>


          <div class="row">


               <label for="txtSecondNum">Give Second Number</label>


               <input type="text" name="txtSecondNum"


               value="<?php echo $num2; ?>">>


          </div>


         

      <div class="row">


               <label for="txtSecondNum">Give Third Number</label>


               <input type="text" name="txtThirdNum" 


               value="<?php echo $num3; ?>">>


          </div>


         

        <div class="row">


              <label for="txtSmallest">The Smallest Number</label>


               <input type="text" name="txtSmallest" 


               value="<?php echo $results; ?>" readonly>


          </div>


          

         

              <div classs="row">


               <button type="submit" name="submit" 


               id="btnCompute">Compute</button>


               <button type="submit" name="clear"


                id="btnClear">Clear</button>


          </div>


     </form>


</body>


</html>

Tuesday, November 17, 2020

Basic Math Operations in PHP

Basic Math Operations in PHP

 In this tutorial I wrote this program to ask the user to give two numbers and then the program will performed addition, subtraction, multiplication, and division using PHP programming language.

 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 in 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.




Program Listing

index.php

<!DOCTYPE html>

<html lang="en">

<head>

     <meta charset="UTF-8">

     <meta name="viewport" content="width=device-width, initial-scale=1.0">

     <title>Basic Math Operations in PHP</title>


     <style>

          body {

               background: #f1f1f1;

               font-family: arial;

               size : 16px;


          }

          form {

               background-color: rgba(0, 0, 0, 0.7);

               color: #000;

               padding: 50px;

               position: absolute;

               -webkit-transform: translate(-50%, -50%);

               transform: translate(-50%, -50%);

               left: 50%;

               top: 50%;

          }

          .row {

               display: block;

               font-size: 0;

               margin-bottom: 18px;

          }

          h1,h2 {

               color: #fefefe;

               text-align: center;

               margin: 0 0 40px 0;

          }

          .row label {

               width: 180px;

               color: #fefefe;

               text-transform: uppercase;

               padding-left: 0!important;

          }

          .row input,

          .row textarea {

               background-color: #fefefe;

               width: 280px;

               color: #000000;

          }

          .row textarea {

               resize: none;

          }

          .row label,

          .row input,

          .row textarea {

               vertical-align: top;

               display: inline-block;

               border: 0;

               margin: 0;

               padding: 15px;

               font-size: 15px;

          }

          form button {

               background-color: #16222A;

               width: 250px;

               display: inline-block;

               border: 0;

               padding: 15px;

               color: #fefefe;

               font-size: 15px;

               text-transform: uppercase;

               cursor: pointer;

          }

          form #btnClear {

               background-color: #486980;

          }

          input:focus,

          select:focus,

          textarea:focus,

          button:focus {

               outline: none;

          }

     </style>

</head>

<body>

     <?php

     error_reporting(0);


     $num1 = $_POST['txtFirstNum'];

     $num2 = $_POST['txtSecondNum'];

    

    if(isset($_POST['submit'])) {

      

     $addition = ($num1 + $num2);

     $subtraction = ($num1 - $num2);

     $multiplication = ($num1 * $num2);

     $division = ($num1 / $num2);

              

      }


     if(isset($_POST['clear'])) {

       $num1 = "";

       $num2 = "";

       $addition = "";

       $subtraction = "";

       $multiplication = "";

       $division = "";

      }

    

    ?>  


     <form action="" method="post">

          <h1>Basic Math Operations in PHP</h1>

          <div class="row">

               <label for="txtFirstNum">Give First Number</label>

               <input type="text" name="txtFirstNum" id="txtFirstNum"

                value="<?php echo $num1; ?>" autofocus>>

          </div>

          <div class="row">

               <label for="txtSecondNum">Give Second Number</label>

               <input type="text" name="txtSecondNum" id="txtSecondNum"

               value="<?php echo $num2; ?>">>

          </div>

         

             

           <div class="row">


               <label for="txtAddition">Addition</label>

               <input type="text" name="txtAddition" 

               value="<?php echo $addition; ?>" readonly>

          </div>

          <div class="row">

               <label for="txtSubtraction">Subtraction</label>

               <input type="text" name="txtSubtraction" 

               value="<?php echo $subtraction; ?>" readonly>

          </div>

          <div class="row">

               <label for="txtMultipy">Multiplication</label>

               <input type="text" name="txtMultipy" "

                 value="<?php echo $multiplication; ?>" readonly>

          </div>

          <div class="row">

               <label for="txtSixthNum">Division</label>

               <input type="text" name="txtDivision" id="txtSixthNum"

               value="<?php echo $division; ?>" readonly>

          </div>

              <div classs="row">

               <button type="submit" name="submit" 

               id="btnCompute">Compute</button>

               <button type="submit" name="clear"

                id="btnClear">Clear</button>

          </div>

     </form>

</body>

</html>


Perfect Number in PHP

Perfect Number in PHP

  In this tutorial, I will show you how to write a program to ask the user to give a number and then the program will check if  the given number is a perfect number or not  using PHP programming language.

 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 in 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.





Program Listing

index.php


<html>

  <head> 

   <title>Perfect Number in PHP </title>

  </head>

  <body> 

      <style type="text/css">

      

      body {

        font-family: arial;

            size: 12px;

      };


        </style>

    <?php

 

     $num_values = $_POST['num_val'];


  function CheckPerfect($num) {

  

  $i = 1;

  $total = 0;


  for($i=1; $i<$num; $i++)

  {

  if($num % $i == 0)

      $total += $i;


  if($total == $num)

    $message = "$num is a perfect number.";

  else

    $message = "$num is not a perfect number.";

     return $message;

    }



   if(isset($_POST['submit'])) {

                  

      $results= CheckPerfect($num_values);

       

      }


 if(isset($_POST['clear'])) {

      $num_values = "";

      $results = "";

    }

?>


  <h2> Perfect Number in PHP </h2>

  <p> Mr. Jake Rodriguez Pomperada,MAED-IT, MIT </p>

<form method="post">

   <p>Give a Number <input 

    type="numeric" name="num_val"

     value="<?php echo $num_values; ?>" autofocus required /></p>

      

<input type="submit" name="submit" 

   title="Click here to compute the cube root. "

   value="Submit" />

   

    &nbsp;&nbsp;&nbsp;

    <input type="submit" name="clear" 

    title="Click here to clear the textbox."

    value="Clear" />

</form>


<?php

   echo $results;

?>

</body>

</html>

Positive and Negative Number in PHP

Positive and Negative Number in PHP

  In this tutorial, I will show you how to write a program to ask the user to give a number and then the program will check if the given number in positive, zero, or negative number using  PHP programming language.

 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 in 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com 

If you like this video please click the LIKE button,

SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.






Program Listing

index.php

<html>

  <head> 

   <title>Positive and Negative Number in PHP </title>

  </head>

  <body> 

      <style type="text/css">

      

      body {

        font-family: arial;

            size: 12px;

      };


        </style>

    <?php

 

     $num_values = $_POST['num_val'];


  function CheckNumber($x) {

    if ($x > 0)

      {$message = "The given number 

                 $x is a Positive number.";}

    if ($x == 0)

      {$message = "The given number 

                 $x is Zero.";}

    if ($x < 0)

      {$message = "The given number 

                 $x is a Negative number.";}

     return $message;

    }



   if(isset($_POST['submit'])) {

                  

      $results= CheckNumber($num_values);

       

      }


 if(isset($_POST['clear'])) {

      $num_values = "";

      $results = "";

    }

?>


  <h2> Positive and Negative Number in PHP </h2>

  <p> Mr. Jake Rodriguez Pomperada,MAED-IT, MIT </p>

<form method="post">

   <p>Give a Number <input 

    type="numeric" name="num_val"

     value="<?php echo $num_values; ?>" autofocus required /></p>

      

<input type="submit" name="submit" 

   title="Click here to compute the cube root. "

   value="Submit" />

   

    &nbsp;&nbsp;&nbsp;

    <input type="submit" name="clear" 

    title="Click here to clear the textbox."

    value="Clear" />

</form>


<?php

   echo $results;

?>

</body>

</html>

Cube Root of a Number in PHP

Cube Root of a Number in PHP

  In this tutorial, I will show you how to write a program to ask the user to give a number and then the program will compute the cube root value of the given number using PHP programming language.

 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 in 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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com 

If you like this video please click the LIKE button,  SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.





Program Listing

index.php


<html>

  <head> 

   <title> Cube Root of a Number in PHP </title>

  </head>

  <body> 

      <style type="text/css">

      

      body {

        font-family: arial;

            size: 12px;

      };


        </style>

    <?php

     $num_values = $_POST['num_val'];


 

   if(isset($_POST['submit'])) {

                    

      $compute = pow($num_values ,1/3);

      $results = "<h4>The Number of Digits : $compute

        </h4>";

       

      }


 if(isset($_POST['clear'])) {

      $num_values = "";

      $results = "";

    }

?>


  <h2> Cube Root of a Number in PHP </h2>

  <p> Mr. Jake Rodriguez Pomperada,MAED-IT, MIT </p>

<form method="post">

   <p>Give a Number <input 

    type="numeric" name="num_val"

     value="<?php echo $num_values; ?>" autofocus required /></p>

      

<input type="submit" name="submit" 

   title="Click here to compute the cube root. "

   value="Submit" />

   

    &nbsp;&nbsp;&nbsp;

    <input type="submit" name="clear" 

    title="Click here to clear the textbox."

    value="Clear" />

</form>


<?php

   echo $results;

?>

</body>

</html>