Monday, August 9, 2021

Grade Solver Using Functions in C++

 A simple grade solver using a function that I wrote in my class in C++ programming.

 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.




Program Listing

#include <iostream>

#include <iomanip>


using namespace std;


 float average(float prelim, float midterm, float final)

  {

      float compute=0;

      bool value;


      compute = (prelim * 0.30) +

                (midterm * 0.30) +

                (final * 0.40);


       if (compute >= 75.00) {

         value = true;

       }

       else

       {

           value = false;

       }


       switch(value) {


           case true : cout << "You Passed !!!";

                       break;

           case false : cout << "You Failed";

                       break;

       }

       cout << "\n\n";

       return(compute);

  }


  main() {

      float pre=0,mid=0,fin=0;


  cout << "\tGrade Solver Using Functions in C++";

  cout << "\n\n";

  cout << "Enter Prelim Grade :=> ";

  cin >> pre;

  cout << "Enter Midterm Grade :=> ";

  cin >> mid;

  cout << "Enter Final Grade :=> ";

  cin >> fin;

  cout << "\n\n";

  cout << fixed << setprecision(2);

  cout << "Your average grade is "

       <<average(pre,mid,fin)<<".";


  cout << "\n\n";

  system("PAUSE");

  }




Sunday, August 8, 2021

Kris Aquino's Television comeback GMA

Area of the Circle in JavaScript

Area of the Circle Using JavaScript

 A simple program to ask the user to give radius value and then the program will convert the given radius into area of the circle using JavaScript 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

index.htm

<html>
   <title>Area of the Circle in JavaScript</title>
 <style type="text/css">

 body {

  font-familyarial;
  font-weightbold;
  font-size:15px;
   }
 
 form
{
  displayinline-block;
  background-colorlightblue;
  padding6px;
}

label{
  displayblock;
  directionrtl
}

input{
  directionltr
}

label::after{
  contentattr(data-text);
}
 </style>

<script language="JavaScript">

function Solve(){

if (document.circle.radius.value === "" || document.circle.radius.value === "0" ) {
  alert("Cannot be empty. Try Again");
  document.circle.radius.focus();
else {

a = parseInt(document.circle.radius.value);

result = "The area of the circle is " + (a * a * Math.PI).toFixed(2);
document.getElementById("tag").innerHTML = result;
  }
}

function Clear() {
document.circle.radius.value ="";
document.getElementById("tag").innerHTML = "";
document.circle.radius.focus();
 }

</script>
<body>
<br>
<h3>Area of the Circle in JavaScript</h3>
<form name="circle">
<label data-text="Enter the radius of circle">&nbsp;&nbsp;
<input type="number" name="radius" autofocus required>
</label>
<br/>
<span id="tag"></span>
 <br><br>
<input type="button" value="Convert" title="Click here to solve." onclick="Solve()" />
<input type="button" value="Clear"  
title="Click here to clear the text box."
onclick="Clear()"/>
</form>
</body>
</html>


Difference of Two Numbers in JavaScript

Difference of Two Numbers in JavaScript

 A simple JavaScript program that I wrote that will ask the user to give two numbers and then it will compute the difference of the two numbers and display the result in 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

index.htm

<html>
   <title>Difference of Two Numbers in JavaScript</title>
 <style type="text/css">

 body {

  font-familyarial;
  font-weightbold;
  font-size:15px;
   }
 
 form
{
  displayinline-block;
  background-colorlightblue;
  padding6px;
}

label{
  displayblock;
  directionrtl
}

input{
  directionltr
}

label::after{
  contentattr(data-text);
}
 </style>

<script language="JavaScript">

function Solve(){

a = parseInt(document.difference.val_1.value);
b = parseInt(document.difference.val_2.value);

if (a > b) {
  result = a - b;
else {
  result = b - a;
}
document.difference.diff.value = (result);
}

function Clear() {
document.difference.val_1.value ="";
document.difference.val_2.value="";
document.difference.diff.value="";
document.difference.val_1.focus();
 }

</script>
<body>
<br>
<h3>Difference of Two Numbers in JavaScript</h3>
<form name="difference">
<label data-text="First Value">&nbsp;&nbsp; 
<input type="text" name="val_1" autofocus required>
</label>
<br />
<label data-text="Second Value">&nbsp;&nbsp;
<input type="text" name="val_2"required="">
</label>
<br/>
<label data-text="Difference">&nbsp;&nbsp;<input type="text" name="diff" >
</label>
<br /> <br>
<input type="button" value="Convert" title="Click here to solve." onclick="Solve()" />
<input type="button" value="Clear"  
title="Click here to clear the text box."
onclick="Clear()"/>
</form>
</body>
</html>

Friday, August 6, 2021

Count Vowels in AngularJS

Count Vowels in AngularJS

 Machine  Problem

Write a program that will ask user to give a string and then the program will display the given string, and then it will count the number of vowels in the given string.

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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

<!-- index.htm

  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

  Date     : July 21, 2021  Wednesday  10:15 PM

  Place    : Bacolod City, Negros Occidental

  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

  Email    : jakerpomperada@gmail.com

 -->

<html ng-app="mainApp">

<head>

<title>Count Vowels in AngularJS</title>

</head>

<style>

body {

font-family: arial;

font-size: 25px;

font-weight: bold;

}

</style>

<script type="text/javascript" src="angular.min.js">

</script>


<script type="text/javascript">


// AngularJS Controller Declaration

angular.module('mainApp', []).service('myService', function() {

  this.myFunc = function(val_1) {

   

     str_upper = val_1.toUpperCase();

    

    // find the count of vowels

    const count = str_upper.match(/[aeiou]/gi).length;


    // return number of vowels

    return count;

  };

}).controller('Count_Vowels_Controller', function($scope, myService) {

  $scope.check = function(val_1) {

    $scope.myUserService = myService.myFunc(val_1);

  }


});

</script>


<div ng-app="mainApp" ng-controller="Count_Vowels_Controller">

<form>

<table border="0" cellspacing=10>

<tr>Count Vowels in AngularJS</tr>

<tr>

  <td>Enter a String</td>

<td><input type="text" ng-model="val_1" ng-init="val_1=''" ng-keyup="check(val_1)"/></td>

</tr>

<table>

</form><br>

<b>The given string {{val_1 | uppercase }}. </b><br><br>

   <b>The number of vowels is {{myUserService}}.</b>

</div>

</body>

</html>



Wednesday, August 4, 2021

Palindrome in AngularJS

Palindrome in AngularJS

 Machine Problem

Write a program that will ask the user to give a string or a series of numbers and then the program will check if the given string or series of numbers is a palindrome or not a palindrome.

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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.








Program Listing

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 21, 2021  Wednesday  9:54 PM
  Place    : Bacolod City, Negros Occidental
  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
  Email    : jakerpomperada@gmail.com
 -->
<html ng-app="mainApp">
<head>
<title>Palindrome in AngularJS</title>
</head>
<style>
body {
font-family: arial;
font-size: 25px;
font-weight: bold;
}
</style>
<script type="text/javascript" src="angular.min.js">
</script>

<script type="text/javascript">

// AngularJS Controller Declaration
angular.module('mainApp', []).service('myService', function() {
  this.myFunc = function(val_1) {
   // find the length of a string
    const len = val_1.length; 

   str_upper = val_1.toUpperCase();
    
    // loop through half of the string
    for (let i = 0; i < len / 2; i++) {

        // check if first and last string are same
        if (str_upper[i] !== str_upper[len - 1 - i]) {
            return 'is not a Palindrome.';
        }
    }
    return 'is a Palindrome.';
  };
}).controller('Palindrome_Controller', function($scope, myService) {
  $scope.check = function(val_1) {
    $scope.myUserService = myService.myFunc(val_1);
  }

});
</script>

<div ng-app="mainApp" ng-controller="Palindrome_Controller">
<form>
<table border="0" cellspacing=10>
<tr>Palindrome in AngularJS</tr>
<tr>
  <td>Enter a String</td>
<td><input type="text" ng-model="val_1" ng-init="val_1=''" ng-keyup="check(val_1)"/></td>
</tr>
<table>
</form>
<b>The given {{val_1 | uppercase }} {{myUserService}}</b>
</div>
</body>
</html>


Tuesday, August 3, 2021

Sending Email in PHP

Sending an Email Using PHP

 A simple program that I wrote that will send an email 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.







Program Listing

email.php


<?php

   $to_email = "jakerpomperada@gmail.com";

   $subject = "Sending Email Using PHP"; 

   $body = "Hi,Jake This is just an email test using mail function in PHP";

   $headers = "From: jakerpomperada@ajsoftware.com";

 

   if ( mail($to_email, $subject, $body, $headers)) {

      echo("Email successfully sent to $to_email...");

   } else {

      echo("Email sending failed...");

   }

?>


US Dollar To Philippine Peso in JavaScript

US Dollar To Philippine Peso in JavaScript

A simple program to ask the user to give US Dollar value and convert into Philippine Peso equivalent using JavaScript 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing


index.htm

<html>

   <title>US Dollar To Philippine Peso in JavaScript  </title>

 <style type="text/css">


 body {


  font-family: arial;

  font-weight: bold;

  font-size:15px;

  }

 

 form

{

  display: inline-block;

  background-color: lightblue;

  padding: 6px;

}


label{

  display: block;

  direction: rtl; 

}


input{

  direction: ltr; 

}


label::after{

  content: attr(data-text);

}

 </style>


<script language="JavaScript">


function PesoConverter(){

document.converter.peso.value = (document.converter.us.value * 49.86).toFixed(2);


}



function Clear() {

document.converter.us.value ="";

document.converter.peso.value="";

document.converter.us.focus();

 

}


function About() {

alert("Created By Prof. Jake R. Pomperada, MAED-IT, MIT");

document.converter.us.focus();

 

}


</script>

<body>

<br>

<h3>US Dollar To Philippine Peso in JavaScript </h3>

<form name="converter">

<label data-text="US Dollar">&nbsp;&nbsp;

<input type="text" name="us" onChange="PesoConverter()" required="">

</label>

<br />

<label data-text="Philippines Peso">&nbsp;&nbsp;

<input type="text" name="peso"  required="">

</label>


<br /> <br>

<input type="button" value="Convert" title="Click here to convert." />

<input type="button" value="Clear"  

title="Click here to clear the text box."

onclick="Clear()"/>

<input type="button" value="About"  

title="Click here to know about the program."

onclick="About()"/>

</form>

</body>

</html>


Monday, August 2, 2021

Prime Number Checker in AngularJS

Prime Number Checker in AngularJS

 Machine Problem

Write a program that will ask the user to give a number and then the program will check if the given number is a prime number or not, 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

<!-- index.htm

  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

  Date     : July 21, 2021  Wednesday  4:26 PM

  Place    : Bacolod City, Negros Occidental

  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

  Email    : jakerpomperada@gmail.com

 -->

<html ng-app="mainApp">

<head>

<title>Prime Number Checker in AngularJS</title>

</head>

<style>

body {

font-family: arial;

font-size: 25px;

font-weight: bold;

}

</style>

<script type="text/javascript" src="angular.min.js">

</script>


<script type="text/javascript">


// AngularJS Controller Declaration

angular.module('mainApp', []).service('myService', function() {

  this.myFunc = function(val_1) {

   if(val_1 < 2) return false;


  for (let k = 2; k < val_1; k++){

    if(val_1 % k == 0){

      return("Not a Prime Number.");

    }

  }

  return("a Prime Number.");


  };

}).controller('Prime_Number_Controller', function($scope, myService) {

  $scope.check = function(val_1) {

    $scope.myUserService = myService.myFunc(val_1);

  }


});

</script>


<div ng-app="mainApp" ng-controller="Prime_Number_Controller">

<form>

<table border="0" cellspacing=10>

<tr>Prime Number Checker in AngularJS</tr>

<tr>

  <td>Enter a Number</td>

<td><input type="number" ng-model="val_1" ng-init="val_1=0" ng-keyup="check(val_1)"/></td>

</tr>

<table>

</form>

<b>The given number {{val_1}} is {{myUserService}}</b>

</div>

</body>

</html>


Leap Year Checker in AngularJS