Saturday, April 30, 2022

Simple Login in Java

Simple Login in Java

 A simple login program that is written in 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 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.Scanner;


public class Simple_Login {

  

 static final String CorrectPassword = "admin";

  static final int MaxLoginAttempts = 3;

  

public static void main (String[] args) {

    boolean loggedIn = false;

    int logginAttempts = 0;


    System.out.println("\n");

    System.out.println("\tSimple Login in Java");

    System.out.println("\n");

    try(Scanner scanner = new Scanner(System.in))

    {


      while(!loggedIn && logginAttempts < MaxLoginAttempts) {

        System.out.print("Password: ");

        String input = scanner.next();

        logginAttempts++;

        if(input.equals(CorrectPassword))

          loggedIn = true;

      }

      System.out.println("\n");

      if(loggedIn) 

        System.out.println("\tLogin successful");

      else

        System.out.println("\tLogin failed");

    }

    catch(Exception ex) {

      ex.printStackTrace();

    }

}

}




Sum and Average of Five Numbers in Java

Sum and Average of Five Numbers in Java

 Machine Problem

Write a program that will ask the user to give five numbers and then our program will find the total sum and average of five numbers using an array.

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


/*
average_array.java
Programmer By: Mr. Jake R. Pomperada, MAED-IT
Date : July 23, 2015
Tools: NetBeans 8.0.2, Java SE 8.0

Problem No. 1:
  
Write a program that will ask the user to give five numbers 
and then our program will find the total sum and average of
five numbers using an array.
*/


import java.util.Scanner;

class average_array {
    
public static void main(String[] args) {
      
     Scanner input = new Scanner(System.in);
     char ch;
   
  do { 
      int [] values; 
      values  = new int[5];  
      int x=0, total_sum=0, average=0;
      System.out.println("\n");
      System.out.print("Sum and Average of Five Numbers in Java");
      System.out.println("\n");
      for (int a=0; a<5; a++)
      {
         x=1;
         x+=a;
         System.out.print("Enter value in item no." + x + " : ");
          
         values[a] = input.nextInt();
         total_sum += values[a];
         average = total_sum/5;
      }
     System.out.println(); 
     System.out.print("The total sum is " + total_sum + ".");
     System.out.println();
     System.out.print("The average of five numbers is " + average + ".");
     System.out.println();
     System.out.print("\nDo you want to continue (Type y or n) : ");
     ch = input.next().charAt(0);                        
     } while (ch == 'Y'|| ch == 'y');  
     System.out.println();
     System.out.print("\t THANK YOU FOR USING THIS PROGRAM");
     System.out.println("\n\n");
     input.close();
  }
}


Friday, April 29, 2022

Add Digits of a Number Using ng-bind in AngularJS

Add Digits of a Number Using ng-bind in AngularJS

 Machine Language

Write a program that uses the ng-bind directive that will accept a series of digits from the user and then the program will add all the digits of a number.  For example, 12345 is equivalent to 15 if we add all the digits of 12345.

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

index.htm

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 29, 2021 Thursday  9:59 PM
  Place    : Bacolod City, Negros Occidental
  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
  Email    : jakerpomperada@gmail.com
 -->
<html>
<head>
  <title>Add Digits of a Number Using ng-bind 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>
       var app = angular.module("add_digits", []);
        app.controller('app', ['$scope', function ($app) {
         $app.process= function () {
          var num1 = $app.num;
          var sum=0,rem=0;
     
         while(num1)
          {
         rem = num1%10;
         sum = (sum+rem);
         num1 = Math.floor(num1/10);
        }
          $app.result = "The add digits of " + $app.num + " is " + sum + ".";
      }
        }]);
    </script> 
</script>  
<div ng-app="add_digits" ng-controller="app">
  <form>
  <table border="0" cellspacing=10>
  <tr>Add Digits of a Number Using ng-bind in AngularJS</tr>
  <tr>
  <td>Enter a Number </td>
  <td><input type="number"  ng-model="num" ng-change="process()"></td>
  </tr>
   
</table>
  </form>
    <span ng-bind="result"></span>
   </p> 
</div>
</body>
</html>


Capital City Quiz Games in C++

CAPITAL CITY QUIZ GAMES IN C++

 A simple game that I wrote in C++ about Capital City Quiz Game a long time ago.

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

// Created By: Mr. Jake Rodriguez Pomperada,MAED-IT
// Date : January 14, 2010  Thursday
// Email : jakerpomperada@yahoo.com
// Tool  : C++


#include <iostream>
#include <string.h>

using namespace std;

main() {
    char ot[20],jap[20],ma[20],ro[20],mo[20],capital[20];

    int wrong=0,right=0;
    string remarks;
    float solve=0;

    cout << "\n\t\t == CAPITAL CITY QUIZ GAMES IN C++ ==";
    cout << "\n";
    cout << " \n\t\tCreated By: Mr. Jake R. Pomperada, MAED-IT";
    cout << "\n\n";
    cout << "What is Capital City of Canada ? : ";
    gets(capital);
    strupr(capital); // Function To Conver Lower Case To UpperCase
    strcpy(ot,"OTTAWA");

    if (strcmp(ot,capital) == 0) {
        cout << "\n Your answer "
             << capital << " is right.";
        cout << "\n The Capital City of Canada is Ottawa.";
        right++;
    }
    else {
        cout << "\n Your answer "
             << capital << " is wrong.";

        cout << "\n The Capital City of Canada is Ottawa.";
        wrong++;
    }
    cout << "\n\n";
    cout << "What is Capital City of Japan ? : ";
    gets(capital);
    strupr(capital); // Function To Conver Lower Case To UpperCase
    strcpy(jap,"TOKYO");

    if (strcmp(jap,capital) == 0) {
        cout << "\n Your answer "
             << capital << " is right.";
         cout << "\n The Capital City of Japan is Tokyo.";
        right++;
    }
    else {
        cout << "\n Your answer "
             << capital << " is wrong.";
        cout << "\n The Capital City of Japan is Tokyo.";
        wrong++;
    }

    cout << "\n\n";
    cout << "What is Capital City of Philippines ? : ";
    gets(capital);
    strupr(capital); // Function To Conver Lower Case To UpperCase
    strcpy(ma,"MANILA");

    if (strcmp(ma,capital) == 0) {
        cout << "\n Your answer "
             << capital << " is right.";
        cout << "\n The Capital City of Philippines is Manila";
        right++;
    }
    else {
        cout << "\n Your answer "
             << capital << " is wrong.";
         cout << "\n The Capital City of Philippines is Manila.";
        wrong++;
    }

   cout << "\n\n";
   cout << "What is Capital City of Italy ? : ";
    gets(capital);
    strupr(capital); // Function To Conver Lower Case To UpperCase
    strcpy(ro,"ROME");

    if (strcmp(ro,capital) == 0) {
        cout << "\n Your answer "
             << capital << " is right.";
        cout << "\n The Capital City of Italy is Rome.";
        right++;
    }
    else {
        cout << "\n Your answer "
             << capital << " is wrong.";
        cout << "\n The Capital City of Italy is Rome.";
        wrong++;
    }

   cout << "\n\n";
   cout << "What is Capital City of Russia ? : ";
    gets(capital);
    strupr(capital); // Function To Conver Lower Case To UpperCase
    strcpy(mo,"MOSCOW");

    if (strcmp(mo,capital) == 0) {
        cout << "\n Your answer "
             << capital << " is right.";
        cout << "\n The Capital City of Russia is Moscow.";
        right++;
    }
    else {
        cout << "\n Your answer "
             << capital << " is wrong.";
        cout << "\n The Capital City of Russia is Moscow.";
        wrong++;
    }


    solve = (right / 5.0) * 50 + 50;

    if (solve >= 75)  {
        remarks = "You Passed the Quiz Congrats !!!";
    }
    else {
        remarks = "Sorry you Failed the Quiz Try Again!!!";
    }


   cout << "\n\n\n";
   cout << " === SUMMARY RESULTS ====";
   cout << "\n";
    cout << "\n Number of Right Answers :=>  "
         << right << ".";
    cout << "\n Number of Wrong Answers :=>  "
          << wrong << ".";
    cout << "\n\n";
    cout << " Your Grade : " << solve;
    cout << "\n Remarks : " << remarks;
    cout << "\n\n";
    system("PAUSE");
}


Thursday, April 28, 2022

Average Grade Using ng-bind in AngularJS

Average Grade Using ng-bind in AngularJS

 Machine Problem

Write a program that uses the ng-bind directive that will accept five grades, and then the program will compute the average grade and display the remarks on whether the student passed or failed in the subject using AngularJS.

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

index.htm

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 29, 2021 Thursday  5:56 PM
  Place    : Bacolod City, Negros Occidental
  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
  Email    : jakerpomperada@gmail.com
 -->
<html>
<head>
  <title>Addition of Three Numbers Using ng-bind 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>
       var app = angular.module("average_grade", []);
        app.controller('app', ['$scope', function ($app) {
         $app.solve_grade= function () {
                $app.average = 0;
                $app.average = ($app.grade_1 + $app.grade_2 + $app.grade_3 + $app.grade_4 + $app.grade_5) / 5 ;
                
                $app.final_grade = $app.average.toFixed(0);

                if ($app.final_grade >= 75) {
                  $app.remarks = "Passed";
                } else {
                  $app.remarks = "Failed";
                }

                $app.result = "The Average Grade is " + $app.final_grade + ". You "
                              + $app.remarks + " the Subject.";
            }
        }]);
    </script> 
</script>  
<div ng-app="average_grade" ng-controller="app">
  <form>
  <table border="0" cellspacing=10>
  <tr>Average Grade Using ng-bind in AngularJS</tr>
  <tr>
  <td>Enter Grade Number 1 </td>
  <td><input type="number"  ng-model="grade_1" ng-change="solve_grade()"></td>
  </tr>
   <tr>
  <td>Enter Grade Number 2 </td>
  <td><input type="number"  ng-model="grade_2" ng-change="solve_grade()"></td>
  </tr>
   <tr>
  <td>Enter Grade Number 3 </td>
  <td><input type="number"  ng-model="grade_3" ng-change="solve_grade()"></td>
  </tr>
   <tr>
  <td>Enter Grade Number 4 </td>
  <td><input type="number"  ng-model="grade_4" ng-change="solve_grade()"></td>
  </tr>
   <tr>
  <td>Enter Grade Number 5 </td>
  <td><input type="number"  ng-model="grade_5" ng-change="solve_grade()"></td>
  </tr>
</table>
  </form>
    <span ng-bind="result"></span>
   </p> 
</div>
</body>
</html>


Greet Person Using ng-init in AngularJS

Greet Person Using ng-init in AngularJS

 Machine Problem

Write a program that uses ng-init directive that will display and greet the person on the screen using  AngularJS.

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

index.htm

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 28, 2021  Wednesday 2:08 PM
  Place    : Bacolod City, Negros Occidental
  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
  Email    : jakerpomperada@gmail.com
 -->
<html>
<head>
  <title>Greet Person Using ng-init 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="Person='Jacob Samuel Pomperada'">
  <form>
  <table border="0" cellspacing=10>
  <tr>Greet Person Using ng-init in AngularJS</tr>
  <tr>
  <td>Hello {{Person | uppercase }}.</td>
  </tr>
</table>
  </form>
  </div>
</body>
</html>

Wednesday, April 27, 2022

Pounds To Kilograms in C

Pounds To Kilograms in C

  A program that will ask the user value in pounds and then it will convert into kilograms in C programming languages.

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

#include  <stdio.h>

int main()
{
    float kilogram=0.00,pound=0.00;
    
    printf("\n\n");
    printf("\tPounds To Kilograms in C");
    printf("\n\n");
    printf("\tEnter Pound Value :  ");
    scanf("%f",&pound);
    kilogram=pound*.454;
    printf("\n\n");
    printf("\t%5.2f Pound(s) = %5.2f Kilogram(s).",pound,kilogram);
    printf("\n\n");
    printf("\tEnd of Program");
    printf("\n\n");
    
}


Pounds To Kilograms in C++

Pounds To Kilograms in C++

 A program that will ask the user value in pounds and then it will convert into kilograms in C++ programming languages.

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

#include  <iostream>
#include  <iomanip>


int main()
{
    float kilogram=0.00,pound=0.00;
    
    std::cout <<"\n\n";
    std::cout <<"\tPounds To Kilograms in C++";
    std::cout <<"\n\n";
std::cout<<"\tEnter Pound Value :  ";
    std::cin>>pound;
    kilogram=pound*.454;
    std::cout <<"\n\n";
    std::cout<<"\t" <<std::fixed << std::setprecision(2) 
<< pound<<" pound(s) = "<<kilogram<<" kg(s)";
    std::cout <<"\n\n";
    std::cout <<"\tEnd of Program";
    std::cout <<"\n\n";
}

Tuesday, April 26, 2022

Print Alphabet in C#

Print Alphabet in C#

 A program that I wrote to display the alphabet from A to Z in upper case format 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 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("\n");
            Console.Write("\tPrint Alphabet in C#");
            Console.WriteLine("\n");
            Console.Write("\t");
            for (char alphabet = 'A'; alphabet <= 'Z'; alphabet++)
            {
               
                Console.Write(alphabet + " ");
            }
            Console.WriteLine("\n");
            Console.Write("\tEnd of Program");
            Console.WriteLine();
            Console.ReadKey();
            
        }
    }
}