Saturday, January 4, 2020

Primer Number Generator in Java

I wrote this program to ask the user to give a number and then the program will list down the prime numbers on the screen 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.

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

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/



Sample Program Output


Program Listing

Prime_Number_Generator.java

import java.util.Scanner;

// Written By Jake R.Pomperada,MAED-IT
// January 4, 2020   Saturday
// jakerpomperada@gmail.com
// Bacolod City, Negros Occidental Philippines

public class Prime_Number_Generator {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner Input = new Scanner(System.in);
System.out.println();
System.out.println("\tPrimer Number Generator in Java");
System.out.println();
System.out.print("\tGive a Number : ");
int num = Input.nextInt();
System.out.println("\n");
System.out.print("\tList of Prime Numbers");
System.out.println("\n");
System.out.print("\t");
for (int i = 2; i <= num; i++){
if (IsPrime(i)){
System.out.print(i+" ");
}
}
}

private static boolean IsPrime(int num) {
boolean flag = true;
for (int i=2; i<num/2; i++){
if (num % i == 0){
flag = false;
break;
}
}
return flag;
}
}





String Inputs in Java

String Inputs in Java

I wrote this program to show you how to accept a string and display the given string in the screen 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.

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

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/



Sample Program Output


Program Listing

String_Input.java

import java.util.Scanner;


public class String_Input {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
String name,address, email;
System.out.println("\n");
System.out.print("\tString Inputs in Java");
System.out.println("\n");
System.out.print("\tEnter Your Name    : ");
name =input.nextLine();
System.out.print("\tEnter Your Address : ");
address =input.nextLine();
System.out.print("\tEnter Your Email   : ");
email =input.nextLine();
System.out.println();
System.out.print("\tDISPLAY RESULTS");
System.out.println("\n");
System.out.print("\tName    : " + name +"\n");
System.out.print("\tAddress : " + address +"\n");
System.out.print("\tEmail   : " + email +"\n");
System.out.println();
System.out.print("\tEnd of the Program");
System.out.println();
}

}



List of Alphabets in Java

Average of Three Numbers in Java

List of Alphabets in Java

Here is a sample program to display the alphabets on the screen 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.

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

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/



Sample Program Output


Program Listing

Alphabets_Example.java


public class Alphabets_Example {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
      System.out.println("\n");
      System.out.println("\tList of Alphabets in Java");
      System.out.println("\n");
      
      for (char ch='A'; ch<='Z'; ch++) {
      System.out.print(" " + ch + " ");
      }
      
      System.out.println("\n");
      System.out.println("\tEnd of Program");
}

}





Average of Three Numbers in Java

I wrote this simple program to ask the user to give three numbers and then the program will compute the average of the three given numbers 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.

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

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/


Sample Program Output


Program Listing

average_value.java

import java.util.Scanner;


public class average_value {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
int a=0,b=0,c=0;
int sum=0,average=0;
System.out.println("\n");
System.out.println("\tAverage of Three Numbers in Java");
System.out.println("\n");
System.out.print("\tEnter First Value  : ");
a = input.nextInt();
System.out.print("\tEnter Second Value : ");
b = input.nextInt();
System.out.print("\tEnter Third Value  : ");
c = input.nextInt();
sum = (a+b+c);
average = (sum/3);
System.out.println();
System.out.print("\tThe Total Average is " + average + ".");
System.out.println("\n");
System.out.println("\tEnd of the Program");
}

}






Friday, January 3, 2020

Reverse a String in Java

Reverse a String in Java

I wrote this program to ask the user to give a string and then the program will reverse the given string using Java as my 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, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/



Sample Program Output


Program Listing

ReverseString.java


import java.util.*;

class ReverseString {

    public static void main(String args[]) {
        String original, reverse = "";
        int i=0;
        Scanner input = new Scanner(System.in);

        System.out.println();
        System.out.println("\tReverse a String in Java");
        System.out.println();
        System.out.print("\tGive a String to Reverse : ");
        original = input.nextLine();

        int length = original.length();
        System.out.println();
        for (i = length-1; i >= 0;  i--) 
             reverse = reverse + original.charAt(i);
        System.out.println("\tThe reverse string is " + reverse +".");
        
       System.out.print("\n\n");
       System.out.print("\tEnd of Program");
       System.out.println();
    }
}






Hello World in Java

Hello World in Java

I wrote this simple program to display a hello world message on the screen 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.

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

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/



Sample Program Output


Program Listing

HelloWorld.java


class HelloWorld {
  
   public static void main(String args[]) {
       System.out.print("Hello World welcome to Java Programming");
   }

}


Thursday, January 2, 2020

Arithmetic Mean in C Language

I wrote this program to ask the user how many items to be processed and then the program will ask the series of numbers and then the program will compute the arithmetic mean 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.

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

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/






Sample Program Output



Program Listing

mean.c

#include<stdio.h>

int main()
{
int n=0, i=0, arr[100], sum=0;
int solve_mean=0;
printf("\n\n");
printf("\tArithmetic Mean in C Language");
printf("\n\n");
printf("\tHow many items? : ");
scanf("%d",&n);
printf("\n");
for(i=0; i<n; i++)
{
printf("\tEnter item no. %d : ",i+1);
scanf("%d",&arr[i]);
sum=sum+arr[i];
}
solve_mean=(sum/n);
printf("\n");
printf("\tThe Arithmetic Mean is %d.",solve_mean);
printf("\n\n");
printf("\tEnd of Program");
printf("\n");
}



Wednesday, January 1, 2020

Sum and Average of a Number in C++

I wrote this program 10 years ago in my C++ programming class in college where I am teaching here in Bacolod City, Negros Occidental Philippines. This program uses a one-dimensional array as its data structure to ask the user to give five numbers and then the program will calculate the sum and average of the 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.

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

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/


Program Listing

sum_average.cpp

#include <iostream>

using namespace std;

main() {
     int val[5], sum=0, average=0;

     cout << "\t\tSUM AND AVERAGE OF THE NUMBER 1.0";
     cout << "\n\n";
     for (int list=0; list < 5; list++) {
      cout << "Enter Item No. " << list+1 << " : ";
      cin >> list[val];
     }
     cout << "\n";
     for (int list=0; list < 5; list++) {
      sum+=list[val];
      average = (sum/5);
      cout << "  " << list[val] << " ";
     }
     cout << "\nThe total sum of the values is " << sum << ".";
     cout << "\nThe average of the values is " << average << ".";
     cout << "\n\n";
     system("PAUSE");
}


Square Values Using Functions in C++

I wrote this program almost 10 years ago that will ask the user to give a series of values and then the program will compute the square values of the given series of numbers using functions in C++ programming language. Happy New year to all my followers and visitors to my website. Thank you for all the support.

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, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Program Listing

square.cpp

#include <iostream>
#include <iomanip>

 using namespace std;

// Global Variable

int values[6],a=0;

 void accept_data(void);
 void display_result(void);

 void accept_data()
 {
    for (a=1; a<=5; a+=1) {
          cout << "Enter Value No. "
               << a << " : ";
           cin >> a[values];
      }
 }

 void display_result()
 {
            cout << "\n\n";
            cout << setw(5)
                 << "VALUES"
                 << setw(18)
                 << "SQUARE VALUES";
            cout << "\n\n";
            for (a=1; a<=5; a+=1) {

           cout <<"\n" << setw(3) << a[values]
                << setw(16)
                << a[values] * a[values];
           }
        cout << "\n\n";
        system("pause");
 }
main() {

     cout << "\n\n";
     cout << "\t\t Square A Value Version 1.0";
     cout << "\n\n\n";

    accept_data();
    display_result();
 }