Categories
C++

General Average of Three Grading Period in C++

 Machine Problem in C++

Design a program that generates the general average of three grading systems. Display the remarks as output,based on the following given scale.

General Average    Equivalent Grade   Remarks

100-97             1.0                EXCELLENT

96-94              1.25               EXCELLENT

93-91              1.50               VERY GOOD

90-88              1.75               VERY GOOD

87-85              2.0                GOOD

84-82              2.25               GOOD

81-79              2.5                SATISFACTORY

76-78              2.75               FAIR

75                 3.0                PASSED

BELOW 75           5.0                FAILED 

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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/* general_average.cpp

Machine Problem in C++

Design a program that generates the general average of three
grading systems. Display the remarks as output,based on the
following given scale.

General Average Equivalent Grade Remarks
100-97 1.0 EXCELLENT
96-94 1.25 EXCELLENT
93-91 1.50 VERY GOOD
90-88 1.75 VERY GOOD
87-85 2.0 GOOD
84-82 2.25 GOOD
81-79 2.5 SATISFACTORY
76-78 2.75 FAIR
75 3.0 PASSED
BELOW 75 5.0 FAILED

/* general_average.cpp

Machine Problem in C++

Design a program that generates the general average of three
grading systems. Display the remarks as output,based on the 
following given scale.

General Average    Equivalent Grade   Remarks
100-97             1.0                EXCELLENT
96-94              1.25               EXCELLENT
93-91              1.50               VERY GOOD
90-88              1.75               VERY GOOD
87-85              2.0                GOOD
84-82              2.25               GOOD
81-79              2.5                SATISFACTORY
76-78              2.75               FAIR
75                 3.0                PASSED
BELOW 75           5.0                FAILED 


Author     : Jake Rodriguez Pomperada, MAED-IT, MIT
Tools      : Dev C++ 
Websites   : www.jakerpomperada.com    www.jakerpomperada.blogspot.com
Email      : [email protected]
Location   : Bacolod City, Negros Occidental, Philippines

*/


#include <iostream> 
#include <iomanip>
#include <string>


int main()
{
	std::string remarks;
	int prelim=0,midterm=0,endterm=0;
	int general_average=0;
	float equiv_grade=0;
	

	std::cout << "\n\n";
	std::cout << "\tGeneral Average of Three Grading Period in C++";
	std::cout << "\n\n";
	std::cout << "\tEnter Prelim Grade  : ";
	std::cin >> prelim;
	std::cout << "\tEnter Midterm Grade : ";
	std::cin >> midterm;
	std::cout << "\tEnter Endterm Grade : ";
	std::cin >> endterm;
	
	 general_average = (prelim+midterm+endterm)/3;
	 
	 
	if (general_average>= 97 && general_average <= 100) {
		 equiv_grade = 1.0;
		 remarks = "EXCELLENT";
	} else if (general_average>= 94 && general_average <= 96) {
		 equiv_grade = 1.25;
		 remarks = "EXCELLENT";
	} else if (general_average>= 91 && general_average <= 94) {
		 equiv_grade = 1.50;
		 remarks = "VERY GOOD";
	} else if (general_average>= 88 && general_average <= 90) {
		 equiv_grade = 1.75;
		 remarks = "VERY GOOD";
	} else if (general_average>= 85 && general_average <= 87) {
		 equiv_grade = 2.0;
		 remarks = "GOOD";
	} else if (general_average>= 82 && general_average <= 84) {
		 equiv_grade = 2.25;
		 remarks = "GOOD";
	} else if (general_average>= 79 && general_average <= 81) {
		 equiv_grade = 2.25;
		 remarks = "SATISFACTORY";
	} else if (general_average>= 76 && general_average <= 78) {
		 equiv_grade = 2.75;
		 remarks = "FAIR";
	}else if (general_average>= 75) {
		 equiv_grade = 3.0;
		 remarks = "FAIR";
	} else {
		 equiv_grade = 5.0;
		 remarks = "FAILED";
	}
	
	std::cout << "\n\n";
	std::cout <<"\tGeneral Average Grade  :  " <<general_average <<"\n";
	std::cout <<"\tEquivalent Grade       :  " 
	 << std::setprecision(3) << equiv_grade <<"\n";
    std::cout << std::fixed << std::showpoint;
	std::cout <<"\tGrade Remarks          :  " <<remarks;
	std::cout << "\n\n";
	std::cout << "\tEnd of Program";
	std::cout << "\n\n";
}

Categories
C

Philippine Peso to Other Currencies in C

Machine Problem in C

 In this tutorial I wrote this program to ask the user  to give Philippine Peso value and convert it to other

 currencies like  hongkong dollar, uae derham, us dollar,  and japanese yen.

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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing


/* php_peso.c

 Machine Problem in C
   
 In this tutorial I wrote this program to ask the user
 to give Philippine Peso value and convert it to other
 currencies like  hongkong dollar, uae derham, us dollar, 
 and japanese yen.
 
 Mr. Jake R. Pomperada,MAED-IT, MIT
 www.jakerpomperada.com
 www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines.
 */
 
 
 #include <stdio.h>
 
 int main()
 {
 	float php_peso = 0.00;
 	float hk_dollar = 0.00, uae_dirham = 0.00;
 	float us_dollar = 0.00, jpn_yen = 0.00;
 	
 	printf("\n\n");
 	printf("\tPhilippine Peso to Other Currencies in C");
 	printf("\n\n");
 	printf("\tGive Philippine Peso Value : ");
 	scanf("%f", &php_peso);
 	printf("\n\n");
 	
 	hk_dollar = (php_peso * 0.16137);
    uae_dirham = (php_peso * 0.07646);
    us_dollar = (php_peso * 0.02081);
    jpn_yen =   (php_peso* 2.1612);

 	printf("\tHong Kong Dollar : %5.2f\n ",hk_dollar);
 	printf("\tUAE Dirham       : %5.2f\n ",uae_dirham); 
 	printf("\tUS Dollar        : %5.2f\n ",us_dollar);
 	printf("\tJapanese Yen     : %5.2f\n ",jpn_yen); 
 	printf("\n\n");
 	printf("\tEnd of Program");
 }
 
Categories
C++

Selection Sort in C++

 Machine Problem in C++

Write a program to ask the user to give a series of numbers and then the program will sort the given numbers using selection sort algorithms.

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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/* selection_sort.cpp
       
    Machine Problem in C++
    
	Write a program to ask the user to give a series of
	numbers and then the program will sort the given 
	numbers using selection sort algorithms.
	    
    Jake R. Pomperada, MAED-IT, MIT
    www.jakerpomperada.com
    www.jakerpomperada.blogspot.com
    [email protected]
    Bacolod City, Negros Occidental, Philippines

*/ 

#include <iostream>

void selection_sort();

int i=0,a[100], num=0;

int main()
{
    
    std::cout <<"\n\n";
    std::cout <<"\tSelection Sort in C++";
    std::cout <<"\n\n";
    std::cout <<"\tHow many items in the array? : ";
    std::cin >> num;
	std::cout <<"\n\n";
    
      for(i=0; i<num; i++) {
     	   std::cout <<"\tGive value in item no." << i+1 << " : ";
     	   std::cin >> a[i];
        }
    std::cout <<"\n\tBefore sorting:\n";
    std::cout <<"\n";
	std::cout <<"\t";
    for(i=0; i<num; i++)
        std::cout << " " << a[i] << " ";
    selection_sort();
    std::cout <<"\n";
    std::cout <<"\n\tAfter sorting:\n";
    std::cout <<"\n";
	std::cout <<"\t";
    for(i=0; i<num; i++)
        std::cout << " " << a[i] << " ";
    std::cout <<"\n\n";
    std::cout <<"\tEnd of Program";
	}

void selection_sort()
{
    int i, j, min, temp;
    for (i=0; i<num; i++)
    {
        min = i;
        for (j=i+1; j<num; j++)
        {
            if (a[j] < a[min])
                min = j;
        }
        temp = a[i];
        a[i] = a[min];
        a[min] = temp;
    }
}
Categories
C

Selection Sort in C

  Machine Problem in C

Write a program to ask the user to give a series of numbers and then the program will sort the given numbers using selection sort algorithms.

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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/* selection_sort.c
       
    Machine Problem in C
    
	Write a program to ask the user to give a series of
	numbers and then the program will sort the given 
	numbers using selection sort algorithms.
	    
    Jake R. Pomperada, MAED-IT, MIT
    www.jakerpomperada.com
    www.jakerpomperada.blogspot.com
    [email protected]
    Bacolod City, Negros Occidental, Philippines

*/ 

#include <stdio.h>

void selection_sort();

int i=0,a[100], num=0;

int main()
{
    
    printf("\n\n");
    printf("\tSelection Sort in C");
    printf("\n\n");
    printf("\tHow many items in the array? : ");
    scanf("%d", &num);
    printf("\n\n");
      for(i=0; i<num; i++) {
     	   printf("\tGive value in item no. %d : ",i+1);
		   scanf("%d", &a[i]);
        }
    printf("\n\tBefore sorting:\n");
    printf("\n");
	printf("\t");
    for(i=0; i<num; i++)
        printf(" %d ", a[i]);
    selection_sort();
    printf("\n");
    printf("\n\tAfter sorting:\n");
    printf("\n");
    printf("\t");  
	for(i=0; i<num; i++)
        printf(" %d ", a[i]);
    getch();
}

void selection_sort()
{
    int i, j, min, temp;
    for (i=0; i<num; i++)
    {
        min = i;
        for (j=i+1; j<num; j++)
        {
            if (a[j] < a[min])
                min = j;
        }
        temp = a[i];
        a[i] = a[min];
        a[min] = temp;
    }
}
Categories
Bash

Factorial a Number in Bash

I wrote this simple bash script to ask the user to give a number and then the program will compute the factorial value of the given number.

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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

#!/bin/bash
#Factorial a Number in Bash  
#Mr. Jake Rodriguez Pomperada,MAED-IT,MIT
#Bacolod City, Negros Occidental Philippines

printf  "\n\n"
printf  "\tFactorial a Number in Bash"
printf  "\n\n"
printf  "\tGive a Number : " 
read num

factorial=1

for((i=2;i<=num;i++))
{
  factorial=$((factorial * i))  #factorial = factorial * i
}

printf  "\n"
printf  "\tThe factorial value of $num is $factorial."
printf  "\n\n"       
printf  "\tEnd of Program"
printf  "\n\n"
Categories
VB6

Square Root a Number in Visual Basic 6

 Machine Problem

Write a program using Microsoft Visual Basic 6 to ask the user to give a number and then the program will convert the given number to its square root equivalent.

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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

' Code By Mr. Jake R. Pomperada,MAED-IT,MIT
' www.jakerpomperada.com
' [email protected]
' Product of Philippines


Private Sub Command1_Click()
Text2.Text = Sqr(Val(Text1.Text))
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End Sub

Private Sub Command3_Click()
End
End Sub
Categories
C

Square Root in C

 Machine Problem in C

   Write a program that will ask the user to give a number and the program will convert the given number into its square root equivalent.

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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/* square_root.c

   Machine Problem in C
   
   Write a program that will ask the user to give a number
   and the program will convert the given number into 
   its square root equivalent.
   
   Mr. Jake R. Pomperada,MAED-IT, MIT
   www.jakerpomperada.com
   www.jakerpomperada.blogspot.com
   [email protected]
   Bacolod City, Negros Occidental, Philippines
*/
 
#include <math.h>
#include <stdio.h>

int main() {
	
   double val_num=0.00;
   double squareRoot=0.00;

   printf("\n");
   printf("\n\tSquare Root in C");
   printf("\n\n");
   printf("\tGive a Number : ");
   scanf("%lf", &val_num);

   /* Coversion To Square Root */
   
   squareRoot = sqrt(val_num);
   
   printf("\n\n");
   printf("\tThe Square Root of %.2lf =  %.2lf",val_num, squareRoot);
   printf("\n\n");
   printf("\tEnd of Program");
   
}
Categories
Java

Decimal To Roman Numeral in Java

Machine Problem in Java

Write a program to ask the user to give a number and then the program will convert the given number into Roman numeral equivalent.

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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/**
Machine Problem in Java

Write a program to ask the user to give a number and then the 
program will convert the given number into Roman numeral 
equivalent.

 @author Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com / www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines
 January 14, 2021 Thursday 8:58 PM
*/

import java.util.*;


public class Decimal_Roman_Numeral {

	private static String Convert_To_Roman_Numeral(int num) {
		String[] romanCharacters = { "M", "CM", "D", "C", "XC", "L", "X", "IX", "V", "I" };
		int[] romanValues = { 1000, 900, 500, 100, 90, 50, 10, 9, 5, 1 };
		String result = "";
		 
		for (int i = 0; i < romanValues.length; i++) {
		int numberInPlace = num / romanValues[i];
		if (numberInPlace == 0) continue;
		result += numberInPlace == 4 && i > 0? romanCharacters[i] + romanCharacters[i - 1]:
		new String(new char[numberInPlace]).replace("\0",romanCharacters[i]);
		num = num % romanValues[i];
		}
		return result;
		}
		 
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc=new Scanner(System.in);
	        int num=0;
	        
	        System.out.println();  
		    System.out.println("\tDecimal To Roman Numeral in Java");
		    System.out.println();
	     
	        System.out.print("\tGive a Number : ");
	        num=sc.nextInt();
	     
	        System.out.println();
	        System.out.println("\tThe Decimal Value   : " + num);
	        System.out.println("\tRoman Numeral Value : "
	        		+ Convert_To_Roman_Numeral(num));
	        System.out.println();
	        System.out.println("\tEnd of Program");
	        System.out.println("\n");
	        sc.close();
	}

} // End of Code

Categories
C++

Percentage in C++

  Machine Problem in C++

Write a program that will ask the user to give score and   total mark and compute the percentage, and display the  results.

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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/* percentage.cpp

   Machine Problem in C++
   
   Write a program that will ask the user to give score and
   total mark and compute the percentage, and display the
   results.
   
   Mr. Jake R. Pomperada,MAED-IT, MIT
   www.jakerpomperada.com
   www.jakerpomperada.blogspot.com
   [email protected]
   Bacolod City, Negros Occidental, Philippines
*/
 
#include <iostream>
#include <iomanip>
 
int main()
{
  float percentage = 0.00;
  int total_marks = 0;
  int scored = 0;

  std::cout <<"\n\n";
  std::cout <<"\tPercentage in C++";
  std::cout <<"\n\n";
  std::cout <<"\tEnter Score       : ";
  std::cin >> scored;
  std::cout <<"\tEnter Total Marks : ";
  std::cin >> total_marks;
    
  percentage = (float)scored / total_marks * 100.0;

  std::cout <<"\n\n";
  std::cout << std::fixed;
  std::cout <<"\tThe Percentage is " << std::setprecision(2) 
  <<percentage <<"%";
  std::cout <<"\n\n";
  std::cout <<"\tEnd of Program";
 }

Categories
C

Percentage in C

  Machine Problem in C

Write a program that will ask the user to give a score and total mark and compute the percentage, and display the results.

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 [email protected], [email protected], and [email protected]

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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

/* percentage.c

   Machine Problem in C
   
   Write a program that will ask the user to give score and
   total mark and compute the percentage, and display the
   results.
   
   Mr. Jake R. Pomperada,MAED-IT, MIT
   www.jakerpomperada.com
   www.jakerpomperada.blogspot.com
   [email protected]
   Bacolod City, Negros Occidental, Philippines
*/
 
#include<stdio.h>
 
int main()
{
  float percentage = 0.00;
  int total_marks = 0;
  int scored = 0;

  printf("\n\n");
  printf("\tPercentage in C");
  printf("\n\n");
  printf("\tEnter Score       : ");
  scanf("%d", &scored);
  printf("\tEnter Total Marks : ");
  scanf("%d", &total_marks);
  
  percentage = (float)scored / total_marks * 100.0;

  printf("\n\n");
  printf("\tThe Percentage is %5.2f%%.", percentage);
  printf("\n\n");
  printf("\tEnd of Program");
 }