Saturday, January 8, 2022

Input Your Name and Age in Java

 Machine Problem


Write a program that shows basic input and output of user's name and age 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.




Program Listing

import java.util.*; public class Input_Name { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("\n"); System.out.println("\tInput Your Name and Age in Java"); System.out.println("\n"); // Input your name System.out.print("\tWhat is your name? "); String name = input.nextLine(); System.out.println("\n"); // Input your age System.out.print("\tHow old are you? "); int age = input.nextInt(); // display output on console System.out.println("\n"); System.out.println("\tHello, " + name + ". Next year, you'll be " + (age + 1) + "."); System.out.println(); System.out.println("\tEnd of Program"); System.out.println(); input.close(); } }

Thursday, January 6, 2022

Factorial a Number Using Recursion in C++

Factorial a Number Using Recursion in C++

 A program that will demonstrate how to use recursion to solve the factorial value of the given number 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.





Program Listing

#include <iostream> int factorial(int n); int main() { int num_val=0; std::cout << "\n\n"; std::cout << "\tFactorial a Number Using Recursion in C++"; std::cout << "\n\n"; std::cout << "\tGive a Number : "; std::cin >> num_val; std::cout << "\n\n"; std::cout << "\tFactorial of " << num_val << " = " << factorial(num_val); std::cout << "\n\n"; std::cout << "\tEnd of Program"; std::cout << "\n\n"; return 0; } int factorial(int n) { if(n > 1) return n * factorial(n - 1); else return 1; }

Reverse a String in C#

Reverse a String in C#

A program that will ask the user to give a string and then the program will display the original string and reverse string output 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.





Program Listing

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;


namespace Reverse_String

{


    

static class StringHelper

{

public static string ReverseString(string str)

{

char[] array = str.ToCharArray() ;

Array.Reverse(array) ;

return new string(array) ;

}

}



    class Program

    {


        

        static void Main(string[] args)

        {



            Console.Write("\n\n");

            Console.Write("Reverse a String in C#");

            Console.Write("\n\n");

            Console.Write("Give a String : ");

            string originalString = Console.ReadLine();


            Console.Write("\n\n");

            Console.Write("Original String     :  " + originalString);

            Console.Write("\n\n");

            Console.WriteLine("Reverse String  : " + StringHelper.ReverseString(originalString));

            Console.ReadLine();

        }

    }

}


Tuesday, January 4, 2022

Reverse An Array in C

Reverse An Array in C

 A  simple program to ask the user to give a series of numbers and then the program will reverse the arrangement of the given numbers using arrays in 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.





Program Listing

#include <stdio.h> #define MAX 100 int main() { int arr[MAX],num=0,i=0,temp=0; printf("\n"); printf("\tReverse An Array in C"); printf("\n\n"); printf("\tEnter size of Array : "); scanf("%d",&num); printf("\n\n"); printf("\tEnter the elements :"); printf("\n\n"); printf("\t"); for(i=0;i<num;i++) { scanf("%d",&arr[i]); } for(i=0;i<num/2;i++) { temp=arr[i]; arr[i]=arr[num-i-1]; arr[num-i-1]=temp; } printf("\n\n"); printf("\tArray after reversing : \n"); printf("\t"); for(i=0;i<num;i++) { printf("%d ",arr[i]);; } printf("\n"); printf("\tEnd of Program"); printf("\n"); }

Monday, January 3, 2022

Bitwise Operators in C

Bitwise Operators in C

 A simple program that demonstrate how to use and declare bitwise operators in 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.





Program Listing

/* bitwise.c

   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT

   Date     : November 19, 2018  Monday 2:38 PM

   Location : Bacolod City, Negros Occidental

   Website  : http://www.jakerpomperada.com

   Emails   : jakerpomperada@jakerpomperada.com

              jakerpomperada@gmail.com

              jakerpomperada@yahoo.com

              jakerpomperada@aol.com

*/


#include <stdio.h>


int main() 

 int x=0, y=0; 

 printf("\n\n");

 printf("\tBitwise Operators in C");

 printf("\n\n");

 printf("\tGive two integers: ");

 scanf("%d%d",&x,&y);

 printf("\n\n");

 printf("\t%d & %d =  %d\n",x,y,(x & y)); 

 printf("\t%d | %d = %d\n",x,y,(x | y)); 

 printf("\t%d ^ %d = %d\n",x,y,(x ^ y));

 printf("\t~%d = %d\n",x,~x); 

 printf("\t%d << %d = %d\n",x,2,(x << 2));

 printf("\t%d >> %d = %d\n",x,2,(x >> 2));

 printf("\n\n");

 printf("\tEnd of Program");

 printf("\n\n");

}


Sunday, January 2, 2022

Factorial a Number Using Recursion in C

Factorial a Number Using Recursion in C

 A factorial program that I wrote using C language that will ask the user to give a number and then it will compute the factorial value of the given number using recursion method.

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.





Program Listing

#include <stdio.h> int factorial_function(int num); int main() { int number_given=0; printf("\n"); printf("\tFactorial a Number Using Recursion in C"); printf("\n\n"); printf("\tGive a Number : "); scanf("%d",&number_given); int result = factorial_function(number_given); printf("\n"); printf("\tThe Factorial of %d = %d", number_given, result); printf("\n\n"); printf("\tEnd of Program"); printf("\n"); return 0; } int factorial_function(int num) { if(num ==0) return 1; else return (num*factorial_function(num-1)); }

Saturday, January 1, 2022

Print 1 To 15 in C++

Print 1 To 15 in C++

 A simple C++ program to display 1 to 15 series of numbers 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.





Program Listing


#include <iostream>

#include <iomanip>


int main()

{

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

    std::cout << "\tPrint 1 To 15 in C++";

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

    for (int a=1; a<=15; a++) {

        std::cout << std::setw(4) << a

        <<std::setw(4);

    }

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

}



Friday, December 31, 2021

Input String in Python 2 in Linux

Input String in Python 2 in Linux

 A simple program in Python shows you have to accept string input from the user using Python 2.

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.






Program Listing

# input_string.py # Reverse a String in Python in Linux # Jake Rodriguez Pomperada, MAED-IT, MIT # www.jakerpomperada.com and www.jakerpomperada.blogspot.com # Globe Number : 09173084360 # Bacolod City, Negros Occidental Philippines. # Version of Python : Python 2.0 print("\n") print("\tInput String in Python 2 in Linux") print("\n") string_val = raw_input("\tGive Your Name : ") print("\n\n") print("\tHow are you {0}?".format(string_val)) print("\n") print("\tEnd of Program") print("\n")

Wednesday, December 29, 2021

Reverse a String in Python in Linux

Reverse a String in Python in Linux

 A program that will ask the user to give a string and then the program will display the original string and the reverse string using Python 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.







Program Listing

# reverse_string.py
# Reverse a String in Python in Linux
# Jake Rodriguez Pomperada, MAED-IT, MIT
# www.jakerpomperada.com and www.jakerpomperada.blogspot.com
# Globe Number : 09173084360
# Bacolod City, Negros Occidental Philippines.
# Version of Python : Python 2.0

def  reverse_string(x):
  return x[::-1]

print("\n")
print("\tReverse a String in Python in Linux")
print("\n")

string_val = raw_input("\tGive a String : ")
# In Python 3 use input instead of raw_input

# Reverse a String here

reverse_str = reverse_string(string_val)
  
# printing of results
print("\n")
print("\tOriginal String : {0} " .format(string_val))
print("\n")
print("\tReverse String  : {0} " .format(reverse_str))

print("\n")
print("\tEnd of Program")
print("\n")


Product of Two Numbers in Python in Linux

Product of Two Numbers in Python in Linux

 A simple program that will ask the user to give two numbers, and then the program will compute the product of the two given numbers using Python programming language in Linux operating system. I am using Linux Mint as my linux distribution in writing this program and sublime as my text editor.

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.


 

Program Listing

# product.py
# Produc of Two Numbers in Python in Linux
# Jake Rodriguez Pomperada, MAED-IT, MIT
# www.jakerpomperada.com and www.jakerpomperada.blogspot.com
# Globe Number : 09173084360
# Bacolod City, Negros Occidental Philippines.

print("\n")
print("\tProduct of Two Numbers in Python in Linux")
print("\n")
num1 = int(input("\tEnter First Number   : "))
num2 = int(input("\tEnter Second Number  : "))

# Multiply two numbers
product = (num1 * num2)

 
# printing values
print("\n")
print("\tThe Product of {0} and {1} is {2}." .format(num1,num2,product))

print("\n")
print("\tEnd of Program")
print("\n")

 

Tuesday, December 28, 2021

Leap Year in Python in Linux

 A program that I will ask the user to give a year and then the program will check if the given year is a leap year or not using Python 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.

 




 

Program Listing

# leap_year.py
# Leap Year in Python in Linux
# Jake Rodriguez Pomperada, MAED-IT, MIT
# www.jakerpomperada.com and www.jakerpomperada.blogspot.com
# Globe Number : 09173084360
# Bacolod City, Negros Occidental Philippines.

print("\n")
print("\tLeap Year in Python in Linux")
print("\n")
year = int(input("\tEnter the Year : "))


# Checking if the given year if a Leap Year or Not

print("\n")

if (year%400 == 0):
          print("\tThe given year %d is a Leap Year." %year)
elif (year%100 == 0):
          print("\tThe given year %d is Not the Leap Year." %year)
elif (year%4 == 0):
          print("\tThe given year %d is a Leap Year." %year)
else:
          print("\tThe given year %d is Not the Leap Year." %year)

print("\n")
print("\tEnd of Program")
print("\n")
 



Monday, December 27, 2021

Addition and Subtraction of Two Numbers in Python in Linux

Addition and Subtraction of Two Numbers in Python in Linux

A simple program to ask the user to give two numbers and then the program will add and subtract the two given numbers by the user using python 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.




 Program Listing

# add_sum.py
# Addition and Subtraction of Two Numbers in Python in Linux
# Jake Rodriguez Pomperada, MAED-IT, MIT
# www.jakerpomperada.com and www.jakerpomperada.blogspot.com
# Globe Number : 09173084360
# Bacolod City, Negros Occidental Philippines.

print("\n")
print("\tAddition and Subtraction of Two Numbers in Python in Linux")
print("\n")
num1 = int(input("\tEnter First Number   : "))
num2 = int(input("\tEnter Second Number  : "))

# Adding two numbers
sum = (num1 + num2)

# Difference of two numbers
diff = (num1 - num2)
 
# printing values
print("\n")
print("\tSum of {0} and {1} is {2}" .format(num1, num2, sum))
print("\tDifference between {0} and {1} is {2}" .format(num1, num2, diff))

print("\n")
print("\tEnd of Program")
print("\n")


Sunday, December 26, 2021

Weekly Salary With Overtime in Java

Weekly Salary With Overtime in Java

  A simple program that I wrote in Python to solve the weekly wage of an employee in a company 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.




Program Listing

import java.util.*;



 

public class WeeklySalary

{


//User Defined Method  to solve the weekly salary of the employee

public static double Solve_Weekly_Salary(double hours, double rate)  

{  


double wages;

if (hours > 40.0)

wages = 40.0 * rate +

1.5 * rate * (hours - 40.0);


else

wages = hours * rate;

return(wages);

}  


 

public static void main(String[] args)

{

Scanner console = new Scanner(System.in);

double solve_wages, rate, hours;

 

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

System.out.print("\tWeekly Salary With Overtime in Java");

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

System.out.print("Enter Hours Worked : ");

hours = console.nextDouble();

System.out.println();

 

System.out.print("Enter Phippine Peso(s) paid per hour : ");

rate = console.nextDouble();

System.out.println();

 

solve_wages = Solve_Weekly_Salary(hours,rate);

System.out.printf("Wages for %.2f hours at PHP %.2f per hour are PHP %.2f.",hours,rate,solve_wages);


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

System.out.println("End of Program");

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

console.close();

}

 

}




Weekly Wages in Python

Weekly Wages in Python

 A simple program that I wrote in Python to solve the weekly wage of an employee in a company using Python 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.




Program Listing

def WeeklyWagesSolve(totalHours, hourlyWage):

    # Return the total weekly wages for a worker working totalHours,
# with a given regular hourlyWage. Include overtime for hours over 40.

if totalHours <= 40:
totalWages = hourlyWage*totalHours
else:
overtime = totalHours - 40
totalWages = hourlyWage*40 + (1.5*hourlyWage)*overtime
return totalWages

def main():
print()
print("\tWeekly Wages in Python")
print()
hours = float(input('Enter hours worked: '))
wage = float(input('Enter Phippine Peso(s) paid per hour : '))

total = WeeklyWagesSolve(hours, wage)

print()
print('Wages for {hours} hours at PHP {wage:.2f} per hour are PHP {total:.2f}.'
.format(**locals()))
print("\nEnd of Program")

main()

Sum of Digits in Python

Sum of Digits in Python

 Machine Problem

Design a program that will ask the user to give a number and then the program will compute the sum of all the digits of the given
number using for loop statement.

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.





Program Listing

#
# Machine Problem
#
# Design a program that will ask the user to give a number and then
# the program will compute the sum of all the digits of the given
# number using for loop statement.

print()
print("\tSum of Digits in Python")
print()

num=int(input("Enter number : "))

sum=0

for digit in str(num):
sum=sum+int(digit)

print()
print("The Sum of Digits is %d." %(sum))
print("\n\tEnd of Program")

Sum of Digits Using While Loop Statement in C