Wednesday, February 16, 2022

Smallest and Biggest Numbers in Java

SMALLEST AND HIGHEST NUMBER IN JAVA

 Write a program in Java that will check what is the highest and  lowest number given by the user using one dimensional 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

Thank you very much for your support.




Program Listing

// smallest_biggest_number.java

// Written By: Mr. Jake R. Pomperada, MAED-IT

// Date : July 7, 2015

// Email Address: jakerpomperada@yahoo.com

//                jakerpomperada@gmail.com


// Problem : Write a program in Java that will check what is the highest and

//           lowest number given by the user using one dimensional array.


import java.util.Scanner;  


public class smallest_highest {

    

    public static void main(String[] args) {


        Scanner input=new Scanner(System.in);

       

        int[] num= new int[10];

       

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

       System.out.print("\t\tSMALLEST AND HIGHEST NUMBER IN JAVA ");

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

       System.out.print("How many items ? : ");

       int n=input.nextInt();

       int smallest = Integer.MAX_VALUE;

       int biggest =Integer.MIN_VALUE;

      

       for(int i =0;i<n;i++) {

            int y=i+1;

            System.out.print("Enter item value no. " + y  + " value : ");

            num[i]=input.nextInt();

            if(num[i] < smallest) {

 

             smallest = num[i];


            }

            if (num[i] > biggest) {

                biggest = num[i];

               }


        }

       System.out.println();

       System.out.println("The Smallest number is  " +smallest + ".");

       System.out.println("The Biggest number is   " +biggest +".");

       System.out.println();

       System.out.println("\t\t END OF PROGRAM");     

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

       input.close();

    }


}


Tuesday, February 15, 2022

Age Checker Using Arrays in C++

Age Checker Using Arrays in C++

 A simple program to check if the given age is already an adult or still a minor 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

Thank you very much for your support.





Program Listing


 #include <iostream>


 using namespace std;


  int ages(int a) {

      if (a >= 18) {

          cout << "You are an adult";

      }

      else

      {

      cout << "Still a Minor";

      }

  }


  main() {

      int age2[1];

      

      cout <<"\n\n";

      cout << "\tAge Checker Using Arrays in C++";

      cout <<"\n\n";

      cout << "Enter your age :";

      cin >> age2[0];

      cout << "\n\n";

      ages(age2[0]);

      cout << "\n\n";

      system("pause");

  }

Monday, February 14, 2022

Kilometers To Miles Using ng-bind in AngularJS

Kilometers To Miles Using ng-bind in AngularJS

 Machine Problem 

Write a program that uses ng-bind directive that will accept distance in kilometers from the user and then the 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

Thank you very much for your support.





Program Listing

<!-- index.htm

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

  Date     : July 29, 2021 Thursday  3:49 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-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("distance", []);

        app.controller('app', ['$scope', function ($app) {

         $app.convert = function () {

                $app.miles = ($app.kilometers * 0.621371192);

                $app.twoDecimal = $app.miles.toFixed(2);

                $app.display = $app.twoDecimal + " Mile(s).";

            }

        }]);

    </script> 

</script>  

<div ng-app="distance" ng-controller="app">

  <form>

  <table border="0" cellspacing=10>

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

  <tr>

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

  <td><input type="number"  ng-model="kilometers" ng-change="convert()"></td>

  </tr>

</table>

  </form>

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

    <span ng-bind="display"></span>

   </p> 

</div>

</body>

</html>



Sunday, February 13, 2022

Computation of Grades in C

Computation of Grades in C

 A simple program to solve the grades of the students 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

Thank you very much for your support.





Program Listing

#include <stdio.h>
#include <stdlib.h>

int sum_of_array(int array[], int size)
{
int sum = 0;

for (int i = 0; i < size; ++i)
sum += array[i];

return sum;
}

char getGrade(int grade)
{
if (grade >= 91 && grade <= 100)
return 'A';
else if (grade >= 81 && grade <= 90)
return 'B';
else if (grade >= 71 && grade <= 80)
return 'C';
else if (grade >= 61 && grade <= 70)
return 'D';
else if (grade <= 60)
return 'E';

return 0;
}

int main()
{
printf("\n");
printf("\tComputation of Grades in C");
printf("\n\n");
printf("How many grades: ");
int num_grades;
scanf("%d", &num_grades);
int *grades = malloc(num_grades * sizeof(int));
for (int i = 0; i < num_grades; ++i)
{
printf("Enter grade %d: ", i + 1);
scanf("%d", &grades[i]);
}
int total_sum = sum_of_array(grades, num_grades);
  int avg = (total_sum / num_grades) * 10;
  printf("\n");
  printf("Your Grade is %d: \tDescriptive Rating: %c", avg, getGrade(avg));
  printf("\n");
  free(grades);

return 0;
}

Addition and Product of Two Numbers Using Functions in Pascal

Addition and Product of Two Numbers Using Functions in Pascal

 A simple program to ask the user to give two numbers and then the program will compute the addition and product of two numbers using functions in Pascal 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

Thank you very much for your support.





Program Listing

Program Addition_Product;
Uses Crt;

Var X,Y : Integer;

Function Addition(X,Y : Integer) : Integer;
Begin
 Addition := (X+Y);
End;

Function Product(X,Y : Integer) : Integer;
Begin
Product := (X*Y);
End;

Begin
  Clrscr;
  Writeln;
  Writeln;
  Write('Addition and Product of Two Numbers Using Functions in Pascal');
  Writeln;
  Writeln;
  Write('Enter First Value  : ');
  Readln(X);
  Write('Enter Second Value : ');
  Readln(Y);

  Writeln;
  Writeln;
  Write('The sum of ' ,X, ' and ',Y, ' is ',addition(x,y),'.');
  Writeln;
  Write('The product of ' ,X, ' and ',Y, ' is ',product(x,y),'.');
  Writeln;
  Writeln;
  Write('End of Program');
  Writeln;
  Readln;
End.


Print 1 To 10 Using For Loop in Pascal

Print 1 To 10 Using For Loop in Pascal

 A simple program to print 1 to 10 using for loop statement using Pascal 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

Thank you very much for your support.





Program Listing

Program Print_1_10;

Uses Crt;


Var A : Integer;


Begin

  Clrscr;

  Writeln;

  Write('Print 1 To 10 Using For Loop in Pascal');

  Writeln;

  Writeln;


    For A:= 1 To 10 Do

     Begin

        Write(A:4);

     End;

  Writeln;

  Writeln;

  Write('End of Program');

  Readln;

End.

String Input in Pascal

String Input in Pascal

 A simple program to ask the users name and then the program will greet the person using Pascal programming language. The program will show how to declare and use strings data type in Pascal.

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

Thank you very much for your support.





Program Listing

Program String_Input;

Uses Crt;


Var Name : String[100];


Begin

 Clrscr;

 Writeln;

 Write('String Input in Pascal');

 Writeln;

 Writeln;

 Write('What is your name? ');

 Readln(Name);

 Writeln;

 Write('Hello ' ,Name, ' How are you?');

 Writeln;

 Writeln;

 Write('End of Program');

 Writeln;

 Readln;

End.


Saturday, February 12, 2022

Letter Grades in Java

Letter Grades in Java

 A simple letter grades program 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

Thank you very much for your support.




Program Listing

/* grades.java

 *

 * Author : Jake Rodriguez Pomperada, MAED-IT, MIT

 * www.jakerpomperada.com  and www.jakerpomperada.blogspot.com

 * jakerpomperada@gmail.com

 * Bacolod City, Negros Occidental Philipipines

 */


import java.util.Scanner;


public class letter_grades

{

  private static int sumOfArray(int [] arr)

  {

   int sum = 0;

  

   for (int i : arr)

       sum += i;

  

   return sum;          

  }

  private static char getGrade(int grade)

  {

     

     if (grade >= 91 && grade <= 100)

        return 'A';

     else if (grade >= 81 && grade <= 90)

        return 'B';

     else if (grade >= 71 && grade <= 80)

        return 'C';

     else if (grade >= 61 && grade <= 70)

        return 'D';

     else if (grade <= 60)

        return 'E';  

              

     return 0;

  }

  public static void main(String[] args) 

  {

    System.out.println("\n\tLetter Grades in Java\n");

    System.out.print("# of grades: ");

    

    Scanner input = new Scanner(System.in);

    int numberOfGrades = input.nextInt();

    int[] scores = new int[numberOfGrades]; 

    

    for (int i = 0; i < scores.length; i++) 

    {

      System.out.printf("Grade (%d): ", i + 1);

      scores[i] = input.nextInt();        

    }

    int total_sum = sumOfArray(scores);

    int avg = (total_sum / numberOfGrades) * 10;

       

    String output = "";

    output += "Your Grade is " + avg + ": Descriptive Rating: " + getGrade(avg);

       

    System.out.println(output);

    input.close();

  }

}


Friday, February 11, 2022

Subtract Two Numbers Using Pointers in C++

Subtract Two Numbers Using Pointers in C++

 A simple program to ask the user to give two numbers and then the program will compute the difference of two numbers using pointers using 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

Thank you very much for your support.





Program Listing

#include <iostream>



int main() {


   int *p1, *p2;

   int val_one=0, val_two=0, subtract=0;


   std::cout << "\n\n";

   std::cout << "\tSubtract Two Numbers Using Pointers in C++";

   std::cout << "\n\n";

   std::cout <<"\tGive Two Numbers : ";

   std::cin >> val_one >> val_two;

   p1 = &val_one;

   p2 = &val_two;


   subtract = *p1 - *p2;


   std::cout <<"\n";

   std::cout <<"\tThe difference between " << val_one 

        << " and " << val_two << " is " << subtract

        << ".";


   std::cout << "\n\n";

   std::cout << "\tEnd of Program";

   return 0;

}

Thursday, February 10, 2022

Word Frequency in C#

Word Frequency in C#

 A program that will perform word frequency 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

Thank you very much for your support.





DOWNLOAD THE COMPLETE AND FREE SOURCE CODE HERE