Tuesday, November 30, 2021

Addition of Two Numbers in Python in Linux

Addition of Two Numbers in Python in Linux

 A simple program that I wrote using Python programming language that will ask the user to give two numbers and then the program will compute the sum of two numbers and display the results 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

# addition.py
# Addition 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 of Two Numbers in Python in Linux")
print("\n")
num1 = int(input("Enter First Number   : "))
num2 = int(input("Enter Second Number  : "))

# Adding two numbers
sum = (num1 + num2)
 
# printing values
print("\n")
print("\tSum of {0} and {1} is {2}" .format(num1, num2, sum))

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


Odd and Even Numbers in C using Linux

Odd and Even Numbers in C using Linux

 A simple program that I wrote using C that ask the user to give a number and then the program will check if the given number is an odd or even number using C language in Linux operating system.

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

 

 /* odd_even.c
   Author : Jake Rodriguez Pomperada, MAED-IT, MIT
   www.jakerpomperada.com  and www.jakerpomperada.blogspot.com
   jakerpomperada@gmail.com
   Bacolod City, Negros Occidenal Philippines.
   */

#include <stdio.h>

int main(){
    
    int a=0;

    printf("\n\n");
    printf("\tOdd and Even Numbers in C using Linux");
    printf("\n\n");
    printf("\tEnter a Number : ");
    scanf("%d",&a);
    /*  true if variable a is perfectly divisible by 2 */
    printf("\n");
    if(a % 2 == 0)
        printf("\tThe given number %d is even.", a);
    else
        printf("\tThe given number %d is odd.", a);
    printf("\n\n");
    printf("\tEnd of Program");
    printf("\n\n");
}


 

 

Area of the Rectangle in C++

Area of Rectangle in C++

 Machine Problem

Write a C++ program that computes for the area of a rectangle. There are two set of measurements given

below Rectangle 1 has a length of 8 and a width of 5. Rectangle 2 has a length of 4 and a width of 20.

Use a user defined function with parameters for this program.

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

/*

2. Area of Rectangle

Write a C++ program that computes for the area of a

rectangle. There are two set of measurements given

below

Rectangle 1 has a length of 8 and a width of 5.

Rectangle 2 has a length of 4 and a width of 20.

Use a user defined function with parameters for this

program.

*/

#include <iostream>


using namespace std;


int AreaofRectangle ( int a, int b)

{

    return a * b;

}


int main()

{

  int l1 = 8;

  int w1 = 5;

  int l2 = 4;

  int w2 = 20;


  cout << "Area1 = " << AreaofRectangle(l1, w1) << "\n";

  cout << "Area2 = " << AreaofRectangle(l2, w2) << "\n";

  return 0;

}

Monday, November 29, 2021

Display User Names Using List in Python

Display User Names Using List in Python

 A simple program that I wrote using python to accept a series of names and display the user names using list data structures in 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

data = []

print("\tDisplay User Names Using List in Python")
print("\n")
while True:
data.append(input("Enter the name : "))

choice = input("Enter another name?? (y/n) : ")
if choice.casefold() == 'n':
break

print("\n")
for user_names in data:
print(user_names);
print("\n")
print("\tEnd of Program")
print("\n")

Sunday, November 28, 2021

Subtraction of Two Numbers Without Using Subtraction Operator in Java

Subtraction of Two Numbers Without Using Subtraction Operator in Java

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





Program Listing


import java.util.Scanner;


public class subtract_two_numbers {


public static void main(String[] args) {

   int val1=0,val2=0;

   

Scanner input_val= new Scanner(System.in);

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

  System.out.println("\tSubtraction of Two Numbers Without Using Subtraction Operator in Java");

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

      System.out.print("\tEnter the first number  : ");

      val1=input_val.nextInt();

      System.out.print("\tEnter the second number : ");

      val2=input_val.nextInt();

      

      int subtract = val1+(~val2+1);

  

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

  System.out.println("\tThe difference between " + val1 +

       " and " + val2+ " is " + subtract + ".");

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

  System.out.println("\tEnd of Program");

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

  input_val.close();

}


}


Saturday, November 27, 2021

Upper Case String in C++

Upper Case String in C++

 Machine Problem

1. Summative Assessment 2

Create a C++ program which converts a given string to uppercase.

The output should be Like the following:

..

Original String:

feu institute of technology.

String in UPPERCASE:

FEU INSTITUTE OF TECHNOLOGY.

CCS0007 Computer Programming 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

/*

1. Summative Assessment 2

Create a C++ program which converts a given string to uppercase.

The output should be Like the following:

..

Original String:

feu institute of technology.

String in UPPERCASE:

FEU INSTITUTE OF TECHNOLOGY.

CCS0007 Computer Programming 2

 */


#include <iostream>

#include <cstring>

#include <cctype>

using  namespace  std ;


int  main ()

{

    char  arr[]  = "feu institute of technology.";

    cout << "Original String:\n";

    cout << arr << "\n";


    for (int i = 0; arr[i] != '\0'; ++i)

        arr[i] = toupper(arr[i]);


    cout << "String in Uppercase:\n";

    cout << arr << "\n";

    cout  <<  "CCS0007  Computer  Programming  2"  <<  endl ;

return  0 ;

}


Friday, November 26, 2021

Yearly Sales in C++

 Machine Problem in C++

Create a program that inputs the total amount of sales for the previous year then allows the user enter 12 double values(use array) representing stores sales for each month of the year. After all 12 values are entered, display each months sales amount and compare the total amount with the previous year then print a message indicating whether it is higher, lower, or equal from the previous year.

 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 at 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 in C++


Create a program that inputs the total amount of sales for the previous year then allows the

user enter 12 double values(use array) representing stores sales for each month of the year.

After all 12 values are entered, display each month̢۪s sales amount and compare the total

amount with the previous year then print a message indicating whether it is higher, lower, or

equal from the previous year.

*/


#include <iostream>

#include <iomanip>




double SalesDate[12];

int i=0;

  

    double total_sales_previous_year=0.00;

    double total_sales_current_year=0.00;

    


int main()

{

  


    std::cout << "Sales data for previous year\n";

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

    for ( i = 0; i < 12; ++i)

    {

      std::cout << "Enter sales for month " << i + 1 << " : ";

      std::cin >> SalesDate[i];

        total_sales_previous_year+=SalesDate[i];

    }

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

    std::cout << "The data for previous year you entered:\n";

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

    for (i = 0; i <12; ++i)

    {

      std::cout << "Month " << i + 1 << " " << SalesDate[i] << "\n";

    }



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

    std::cout << std::fixed << std::showpoint;

    std::cout << std::setprecision(2);

    std::cout << "Total Previous Year Sales PHP " << total_sales_previous_year;

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


    std::cout << "Sales data for current year\n";

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

    for ( i = 0; i < 12; ++i)

    {

      std::cout << "Enter sales for month " << i + 1 << " : ";

      std::cin >> SalesDate[i];

       total_sales_current_year+=SalesDate[i];

    }

    

     

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

    std::cout << "The data for current year you entered:\n";

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

    for ( i = 0; i < 12; ++i)

    {

      std::cout << "Month " << i + 1 << " " << SalesDate[i] << "\n";

    }


  

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

    std::cout << std::fixed << std::showpoint;

    std::cout << std::setprecision(2);

    std::cout << "Total Current  Year Sales PHP " <<  total_sales_current_year;

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

    

    if (total_sales_current_year >  total_sales_previous_year)

      std::cout << "The current sales are higher than previous sales.\n";

    else if (total_sales_current_year <  total_sales_previous_year)

      std::cout << "The previous sales are higher than current sales.\n";

    else

      std::cout << "The current sales are equal to the previous sales.\n";

return 0;

}


Temperature Listing in C++

Temperature Listing in C++

 Machine Problem in C++

Write a program in C++ to converts the given temperature measurements in Celsius to Fahrenheit. Use an looping statement, and an array for this program.

 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 at 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

// temperature.cpp

// Jake Rodriguez Pomperada, MAED-IT, MIT

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

// jakerpomperada@gmail.com


/* Machine Problem in C++


Write a program in C++ to converts the given

temperature measurements in Celsius to Fahrenheit.

Use an looping statement, and an array for this

program.


*/



#include <iostream>


using namespace std;


int main()

{

  float celsius[] = {35.2, 26.3, 34.78, 19.34, 33.7};

  float fahrenheit=0.00;

 

 cout <<"\n\n";


cout << "\tThe temperature measurements in Celsius are:\n\n";

cout << "\t";

for (int a=0; a<5; a++) {

  cout <<a[celsius] << " ";

 }   


 cout <<"\n\n";

 

cout << "\tThe temperature measurements in Fahrenheit are:\n\n";

cout << "\t";

for (int a=0; a<5; a++) {

fahrenheit = (a[celsius] * 9.0) / 5.0 + 32;

   cout <<fahrenheit<< " ";

 }   

cout <<"\n\n";

cout << "\tEnd of Program";

cout <<"\n\n";

}


Thursday, November 25, 2021

Lower Case in C++

Lower Case in C++

 Machine Problem in C++

/*

 * 2.Summative Assessment 2

 * Create a C++ program which converts a given string to

 * lowercase.

 * The output should be like the following:

 * Original  String :

 * I  LOVE  C++  PROGRAMMING!

 * String  in  lowercase :

 * i  love  c++  programming!

 * CCS0007  Computer  Programming  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 at 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 <cstring>

#include <cctype>


using  namespace  std ;


int  main ()

{

    char  arr[]  = "I  LOVE  C++  PROGRMlMING!";

    cout << "Original String:\n";

    cout << arr << "\n";


    for (int i = 0; arr[i] != '\0'; ++i)

        arr[i] = tolower(arr[i]);


    cout << "String in Lowercase:\n";

    cout << arr << "\n";

    cout  <<  "\n\nCCS0007  Computer  Programming  2"  <<  endl ;

return  0 ;

}



Wednesday, November 24, 2021

Rain Drops Checker in C++

Rain Drops Checker in C++

 Machine Problem in C++

A weather station validates the rain into its critical  level by its raindrops fell. Make program that will input number of raindrops fell, Check if raindrops  fell is equal to 10,000 then display "CRITICAL RAIN".   Your program will be terminated if you input zero in  the raindrops fell.  

 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 at 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


/*

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

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

jakerpomperada@gmail.com

Bacolod City, Negros Occidental Philippines.


Machine Problem in C++


A weather station validates the rain into its critical 

level by its raindrops fell. Make program that will 

input number of raindrops fell, Check if raindrops 

fell is equal to 10,000 then display "CRITICAL RAIN". 

Your program will be terminated if you input zero in 

the raindrops fell.   


*/


#include <iostream>



int main()

{

   int raindrops=0;

   

do {


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

std::cout << "\tRain Drops Checker in C++";

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

std::cout <<"\tEnter number of raindrops fell: ";

std:: cin >>raindrops;

if (raindrops==0) {

break; 

}

if (raindrops <= 10000) {

std::cout <<"\n";

std::cout <<"\tCRITICAL RAIN";

} else {

std::cout <<"\n";

std::cout <<"\tNORMAL RAIN";

} while (raindrops!=0);

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

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

std::cout <<"\n";

}

Subtract Two Numbers Without Using Subtraction Operator in C++

Subtract Two Numbers Without Using Subtraction Operator in C++

  A simple program that I wrote using C++ programming language that will ask the user to give two number and then the program will subtract the difference of two numbers without using subtraction operator.

 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 at 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

/* Subtract two numbers without using subtraction operator */


#include <iostream>


int main(){

    

int x=0,y=0,sum=0;

    

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

    std::cout <<"\tSubtract Two Numbers Without Using Subtraction Operator in C++";

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

    /* Input Here */

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

    std::cin >> x >> y;

    /* Computation Here */

sum = x + ~y + 1;

    

     /* Output */

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

std::cout <<"\tDifference between " << x <<

       " and " << y << " is " << sum << ".";

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

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

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

}

Tuesday, November 23, 2021

Subtract Two Numbers Without Using Subtraction Operator in C

Subtract Two Numbers Without Using Subtraction Operator in C

 A simple program that I wrote using C programming language that will ask the user to give two number and then the program will subtract the difference of two numbers without using subtraction operator.

 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 at 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

/* Subtract two numbers without using subtraction operator */


#include <stdio.h>


int main(){

    

int x=0,y=0,sum=0;

    

    printf("\n\n");

    printf("\tSubtract Two Numbers Without Using Subtraction Operator in C");

    printf("\n\n");

    /* Input Here */

    printf("\tGive Two Numbers : ");

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

    /* Computation Here */

sum = x + ~y + 1;

    

     /* Output */

    printf("\n\n");

printf("\tDifference between %d and %d is %d.",x,y,sum);

    printf("\n\n");

    printf("\tEnd of Program");

    printf("\n\n");

}