Thursday, March 31, 2022

Average Grade Solver in C

 Machine Problem

Write a program that will ask the student to give the prelim, midterm, and final grade, and then the program will compute the average grade of the student and display the result 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 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.

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

/* grade.c

   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT

   Date     : November 13, 2018  Tuesday 9:44 PM

   Location : Bacolod City, Negros Occidental

   Tool     : Dev C++ Version 5.11

   Website  : http://www.jakerpomperada.com

   Email    : jakerpomperada@jakerpomperada.com

*/


#include <stdio.h>


int main() 

 {

  float solve_average=0.00;

  float prelim=0.00,midterm=0.00,final=0.00;

  

  system("COLOR F0");

  printf("\n\n");

  printf("\tAverage Grade Solver in C");

  printf("\n\n");

  printf("\tGive Prelim Grade   : ");

  scanf("%f",&prelim);

  printf("\tGive Midterm Grade  : ");

  scanf("%f",&midterm);

  printf("\tGive Final Grade    : ");

  scanf("%f",&final);


  solve_average =(prelim+midterm+final)/3;


  printf("\n\n");

  printf("\t===== DISPLAY RESULTS =====");

  printf("\n\n");

  printf("\tThe student average grade is %.2f.",solve_average);

  printf("\n\n");

  printf("\tEND OF PROGRAM");

  printf("\n\n");

}




Wednesday, March 30, 2022

Accepts Only Numbers in C++

Accepts Only Numbers in C++

 A simple program that will only accept numbers using the C++ 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.

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


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

Want to support my the 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

#include <iostream>
#include <limits>

const auto MaxIgnore =  std::numeric_limits<std::streamsize>::max();

int main()
{
    int num = 0 ;
    bool done = false;

     std::cout <<"\n\n";
     std::cout <<"\tAccepts Only Numbers in C++";
     std::cout <<"\n\n";
    while(!done)
    {
        
std::cout <<"\n";
std::cout << "\tEnter an integer: ";
        if(std::cin >> num)
        {
            std::cout <<"\n";
std::cout << "\tWell done. You entered: " << num;
            done = true;
        }
        else
        {
            std::cout <<"\n";
std::cout << "\tInvalid input!\n";
            std::cin.clear();
            std::cin.ignore(MaxIgnore, '\n');
        }
    }
std::cout <<"\n\n";
     std::cout <<"\tEnd of Program";
     std::cout <<"\n\n";
}


My Online Arithmetic Calculator in PHP

My Online Arithmetic Calculator in PHP

 A simple online arithmetic calculator using PHP programming language that can perform addition, subtraction, multiplication, and division.

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.

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


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

Want to support my the 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

index.php

<?php
    $form = "";
    $solution = "display:none;";
    if(isset($_POST["operand1"], $_POST["operand2"], $_POST["operation"])) {
        switch ($_POST["operation"]) {
            case 'Add':
                $calc = $_POST["operand1"] + $_POST["operand2"];
                $operand1 = "1st Addend is ".$_POST["operand1"];
                $operand2 = "2nd Addend is ".$_POST["operand2"];
                $result   = "The Sum is ".$calc;
                break;
            case 'Subtract':
                $calc = $_POST["operand1"] - $_POST["operand2"];
                $operand1 = "Minuend is ".$_POST["operand1"];
                $operand2 = "Subtrahend is ".$_POST["operand2"];
                $result   = "The Difference is ".$calc;
                break;
            case 'Multiply':
                $calc = $_POST["operand1"] * $_POST["operand2"];
                $operand1 = "Multiplicand is ".$_POST["operand1"];
                $operand2 = "Multiplier is ".$_POST["operand2"];
                $result   = "The Product is ".$calc;
                break;
            case 'Divide':
                $calc = $_POST["operand1"] / $_POST["operand2"];
                $operand1 = "Dividend is ".$_POST["operand1"];
                $operand2 = "Divisor is ".$_POST["operand2"];
                $result   = "The Qoutient is ".$calc;
                break;
        }
        $form = "display:none;";
        $solution = "";
    }
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Online Arithmetic Calculator in PHP</title>
    <style>
        *, html {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        body {
            display: flex;
            justify-content: center;
        }
        h1 {
            font-size: 40px;
            border-top: 1px solid #000;
            border-bottom: 1px solid #000;
            padding: 5px;
            margin-bottom: 20px;
            text-align: center;
        }
        label {
            font-size: 20px;
        }
        .container {
            margin-top: 15vh;
            padding: 10px;
        }
        form {
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .wrapper {
            display: block;
            margin: 0 auto 10px;
            width: 300px;
        }
        input {
            padding: 5px;
            font-size: 14px;
        }
        table {
            margin-left: 30px;
        }
        .operations table td label,
        .operations table td input {
            cursor: pointer;
        }
        button {
            padding: 8px;
            width: 90px;
        }
        .border {
            padding: 50px;
            border: 1px solid #000;
        }
        .border h2 {
            font-size: 25px;
            margin-bottom: 5px;
        }
        .border p {
            margin-bottom: 5px;
        }
    </style>
</head>
<body>
    <main class="container">
        <div style="<?= $form; ?>">
            <h1>My Online Arithmetic Calculator in PHP</h1>
<h3 align='center'> Jake Rodriguez Pomperada, MAED-IT,MIT </h3>
             <br><br>
            <form action="" method="post">
                <div class="wrapper">
                    <label for="">Operand #1: </label>
                    <input type="number" name="operand1" placeholder="Enter a number" required>
                </div>
                <div class="wrapper">
                    <label for="">Operand #2: </label>
                    <input type="number" name="operand2" placeholder="Enter a number" required>
                </div>
                <div class="wrapper operations">
                    <label>Choose Operation:</label>
                    <table>
                        <tr>
                            <td>
                                <input type="radio" name="operation" id="Add" value="Add" checked>
                                <label for="Add">- Add</label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="radio" name="operation" id="Subtract" value="Subtract">
                                <label for="Subtract">- Subtract</label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="radio" name="operation" id="Multiply" value="Multiply">
                                <label for="Multiply">- Multiply</label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="radio" name="operation" id="Divide" value="Divide">
                                <label for="Divide">- Divide</label>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="wrapper">
                    <button type="submit">Submit</button>
                </div>
            </form>
        </div>
        <div class="border" style="<?= $solution; ?>">
            <h2>Hello!</h2>
            <p>You sent the following values:</p>
            <p><?= $operand1; ?></p>
            <p><?= $operand2; ?></p>
            <p><?= $result; ?></p>
        </div>
    </main>
</body>
</html>


Tuesday, March 29, 2022

Product and Sum of Two Numbers Using Text File in C++

Product and Sum of Two Numbers Using Text File in C++

 A simple program to show how to declare text files, one-dimensional arrays, creating functions using a C++ 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.

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


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

Want to support my the 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

// math.cpp

// Jake R. Pomperada, MAED-IT, MIT

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

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental


#include <iostream>

#include <fstream>


using namespace std;



int add(int x, int y)

{

    return(x+y);

}


int product(int a,int b)

{

    return(a*b);

}


  int main() {

      ofstream myfile("solve.txt");

      int values[2];


      cout << "\n\n";

      cout << "\t\tProduct and Sum of Two Numbers Using Text File in C++";

      cout << "\n\n";

      cout << "Enter two numbers :=> ";

      cin >> values[0] >> values[1];

      cout << "\n";

      cout << "\nThe product of "

           << values[0] << " and "

           << values[1] << " is "

           << product(values[0],values[1])

           << ".";

        cout << "\nThe sum of "

           << values[0] << " and "

           << values[1] << " is "

           << add(values[0],values[1])

           << ".";

        

         cout << "\n\n";

         cout << "Data has been saved in solve.txt";

         cout << "\n\n";

         myfile << "\n======================";

         myfile << "\n   Resulted Values ";

         myfile << "\n======================";

         myfile << "\n";

         myfile << "\nThe product of "

           << values[0] << " and "

           << values[1] << " is "

           << product(values[0],values[1])

           << ".";

        myfile << "\nThe sum of "

           << values[0] << " and "

           << values[1] << " is "

           << add(values[0],values[1])

           << ".";

         myfile << "\n\n";

         myfile.close();

         system("pause");

  }

Days of The Week in C#

Days of the Week in C#

 A program to display the current day of the week and all the days of the week using the C# 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.

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


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

Want to support my the 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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
            {

              
                DayOfWeek today = DateTime.Today.DayOfWeek;
               

                Console.WriteLine();
                Console.Write("\tDays of the Week in  C#");
                Console.WriteLine("\n\n");

                Console.WriteLine("\tToday is {0}\n\n", today);
                // Demonstrate all DayOfWeek values.
                Console.WriteLine("\t{0}, {1}, {2}, {3}, {4}, {5}, {6}",
                    DayOfWeek.Monday,
                    DayOfWeek.Tuesday,
                    DayOfWeek.Wednesday,
                    DayOfWeek.Thursday,
                    DayOfWeek.Friday,
                    DayOfWeek.Saturday,
                    DayOfWeek.Sunday);

                    Console.ReadKey();
                       
        }
    }
}

Monday, March 28, 2022

Factorial a Number Using Recursion in C#

  A program that will ask the user to give a number and then the program will compute the factorial value of the given number using a recursion algorithm using C# 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.

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


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

Want to support my the 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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine();
            Console.Write("\tFactorial a Number Using Recursion in C#");
            Console.WriteLine("\n");
            Console.Write("\tGive a Number : ");    
    
          
            int number =Convert.ToInt32(Console.ReadLine());    
    
           
            double factorial = Factorial_Recursion(number);

            Console.WriteLine("\n");
            Console.WriteLine("\tThe factorial of "+number+" = "+factorial.ToString());
            Console.WriteLine();
            Console.Write("\tEnd of Program");
            Console.WriteLine();
            Console.ReadKey();
    
        }    
        public static double Factorial_Recursion(int number)    
        {    
            if (number == 0)    
                return 1;    
            return number * Factorial_Recursion(number-1);//Recursive call here 
    
        }    
        }
    }

Factorial a Number Using Recursion in Java

Factorial a Number Using Recursion in Java

 A program that will ask the user to give a number and then the program will compute the factorial value of the given number using a recursion algorithm using Java 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.

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


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

Want to support my the 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

import java.util.*;

public class Factorial {

public static void main(String args[])
{
    int num;
Scanner input  = new Scanner(System.in);
   System.out.println("\n");
        System.out.print("\tFactorial a Number Using Recursion in Java");
        System.out.println("\n");
    System.out.print("\tGive a Number : ");
    num=input.nextInt();
        System.out.println();
    System.out.println("\tThe factorial("+num+") = "+factorial_recursion(num)+"\n");
    System.out.print("\tEnd of Program");
        System.out.println("\n");

    input.close();
   
}

static int factorial_recursion(int n)
{
    if(n==0)
        return 1;
    else
        return n*factorial_recursion(n-1);
}
}


Saturday, March 26, 2022

Addition of Five Numbers in AngularJS

Addition of Five Numbers in AngularJS

 Machine Problem

Write a program that uses ng-model directive that will accept five numbers from the user and then the program will display the five given numbers and compute the total sum of the given five numbers 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 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.

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


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

Want to support my the 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

<!-- index.htm Author : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT Date : July 26, 2021 Monday 3:00 PM Place : Bacolod City, Negros Occidental Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com Email : jakerpomperada@gmail.com --> <html> <head> <title>Addition of Five Numbers Using ng-model 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><br> <div ng-app ng-init="val_1=0;val_2=0;val_3=0;val_4=0;val_5=0;"> <form> <table border="0" cellspacing=10> <tr>Addition of Five Numbers Using ng-model in AngularJS</tr> <tr> <td>Enter 1st Value </td> <td><input type="number" ng-model="val_1" ></td> </tr> <td>Enter 2nd Value </td> <td><input type="number" ng-model="val_2" ></td> </tr> <td>Enter 3rd Value </td> <td><input type="number" ng-model="val_3" ></td> </tr> <td>Enter 4th Value </td> <td><input type="number" ng-model="val_4" ></td> </tr> <td>Enter 5th Value </td> <td><input type="number" ng-model="val_5" ></td> </tr> </table> </form> <p>The sum of {{val_1}}, {{val_2}}, {{val_3}}, {{val_4}}, and {{val_5}} is {{val_1+val_2+val_3+val_4+val_5}}. </p> </div> </body> </html>

Kilometers To Miles in AngularJS

Kilometers To Miles Using AngularJS

 Machine Problem 

Write a program that uses ng-model directive that will accept distance in kilometers from the user and then the program will convert the given kilometer distance value into miles distance equivalent, 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 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.

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


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

Want to support my the 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

<!-- index.htm

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

  Date     : July 26, 2021  Monday   3:00 PM

  Place    : Bacolod City, Negros Occidental

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

  Email    : jakerpomperada@gmail.com

 -->

<html>

<head>

  <title>Kilometers To Miles Using ng-model 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><br>

<div ng-app ng-init="kilometers=0">

  <form>

  <table border="0" cellspacing=10>

  <tr>Kilometers To Miles Using ng-model in AngularJS</tr>

  <tr>

  <td>Enter Kilometer(s) Value </td>

  <td><input type="number"  ng-model="kilometers" ></td>

  </tr>

</table>

  </form>

  <p>{{kilometers}} Kilometer(s) is equivalent to 

     {{(kilometers * 0.621371192) | number:2}} Mile(s).</p> 

</div>

</body>

</html>



Area of a Square in C