Sunday, February 13, 2022

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




Wednesday, February 9, 2022

Computation of Grades in Java

 A program that will compute the grades of the student and then it will display the letter grade of the student 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.

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 grades {
/** Main method */
public static void main(String[] args) {
// Create a Scanner
Scanner input = new Scanner(System.in);

int[] scores = new int[100];
int average=0; int total_sum=0, numberOfGrades;
char grade = 0;
int grades=0;
int i=0;

System.out.println();
System.out.println("\tComputation of Grades in Java");
System.out.println();
System.out.print("# of grades: ");
numberOfGrades = input.nextInt(); for (i = 1; i <= numberOfGrades; i++) {
System.out.print("("+i+"): ");
scores[i] = input.nextInt();

} System.out.println();

for ( i = 1; i <= numberOfGrades; i++) {

total_sum+=scores[i];
average = (total_sum/numberOfGrades)* 10;
grades = (average);
}
System.out.print(grades);


System.out.println();


String output = "";
if (grades >= 91 && grades <= 100)
grade = 'A';
else if (grades >= 81 && grades <= 90)
grade = 'B';
else if (grades >= 71 && grades <= 80)
grade = 'C';
else if (grades >= 61 && grades <= 70)
grade = 'D';
else if (grades <= 60)
grade = 'E'; output += "Your Grade is " + grades + ": Descriptive Rating: "
+ grade;

System.out.println();
System.out.println(output);
input.close();
}
}


How To Write and Run a JavaScript Program

Tuesday, February 8, 2022

Name Generator App in Python

Name Generator App in Python

 A simple program to generate random names 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

Thank you very much for your support.





Program Listing

import random

first = ["Kai", "Hunter", "Luca", "Quinn", "River", "Skylar", "Hayden", "Riley", "Reese", "Jude"]
middle = ["Abbot", "Griffith", "Maxfield", "Rufus", "Eva", "Emma", "Olivia", "Sims", "Tan", "Ovilda"]
last = ["James", "Doha", "Harden", "Jordan", "Bryant", "Williams", "Simmons", "Imbid", "George", "Leonard"]
namebank = []
while True:
name = input("Do you want to generate a new name? [y/n]: ")
if name.upper() == "Y":
rand = random.randint(0, 4)
randname = first[rand] + " " + middle[rand] + " " + last[rand]
namebank.append(randname)
print(f"Your new name is {randname}\n")
continue
elif name.upper() == "N":
print("Thank you!")
print("List of generated names:")
for x in namebank:
print(f"{x}")
break

Minimum Number in an Array in Java

Minimum Number in an Array in Java

  A program to check and display the minimum number in an array 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

Thank you very much for your support.





Program Listing



public class minimum

{

    public static void main(String[] args)

    {

     

         //Loop through the array  

        int elements[]={-5,300,20,4000,8,341};

        int min = elements[0]; 

        

        System.out.println();

        System.out.print("\tMinimum Number in an Array in Java");

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

   

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

           if(elements[i] <min)  

               min = elements[i];  

        } 

        System.out.println("\tMinimum Number : "+ min);

        System.out.println();

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

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

        }

    }



Monday, February 7, 2022

Maximum Number in an Array in Java

Maximum Number in an Array in Java

 A program to check and display the maximum number in an array 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

Thank you very much for your support.




Program Listing



public class Maximum_Number

{

    public static void main(String[] args)

    {

        int i,max=0;

        int elements[]={-5,300,20,4000,8,341};

        

        System.out.println();

        System.out.print("\tMaximum Number in an Array in Java");

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

   

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

        {

            if(elements[i]>max)

            {

                max=elements[i];

            }

        }

        System.out.println("\tMaximum Number : "+max);

        System.out.println();

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

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

    }

}

Sunday, February 6, 2022

The Smallest and Biggest Number in C#

The Smallest and Biggest Number in C#

 A simple program to check which of the given numbers has the smallest and biggest numerical value 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

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int i=0; int[] items = new int[100]; Console.Write("\n\n"); Console.Write("\tThe Smallest and Biggest Number in C#"); Console.Write("\n\n"); Console.Write("\tHow Many Items? "); int n = Convert.ToInt16(Console.ReadLine()); Console.Write("\n\n"); for (i = 1; i <= n; i++) { Console.Write("\tEnter the No. " + i + ": "); items[i] = Convert.ToInt16(Console.ReadLine()); } for (i = 1; i <= n; i++) { for (int j = 1; j <= n - 1; j++) { if (items[j] > items[j + 1]) { int temp = items[j]; items[j] = items[j + 1]; items[j + 1] = temp; } } } Console.Write("\n\n"); //Display the Smallest Numerical Value Console.WriteLine("\tThe Smallest Numerical Value : " + items[1]); //Display the Biggest Numerical Value Console.WriteLine("\tThe Largest Numerical Value : " + items[n]); Console.Write("\n\n"); Console.Write("\tThe End of Program"); Console.Write("\n\n"); Console.ReadKey(); } } }


Saturday, February 5, 2022

Display 1 To 20 Using For Loop in C++

Display 1 To 20 Using For Loop in C++

 A simple program to display a series of numbers from 1 to 20 using for loop statement in C++.

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>

#include <iomanip>


int main()

{

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

 std::cout <<"\tDisplay 1 To 20 Using For Loop in C++";

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

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

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

 }

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

}


How To Write and Run C++ Programs in CodeBlocks

Friday, February 4, 2022

Factors of a Number Using For Loop in Java

Factors of a Number Using For Loop in Java

 Write a Java program to Find Factors of a Number using For loop 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

Thank you very much for your support.




Program Listing

factors.java


/* Write a Java program to Find Factors of a Number using For loop */


import java.util.Scanner;


public class factors {


    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);


        int x=0, i=0;

        char ch;

        

        do {

            System.out.println();

            System.out.print("\tFactors of a Number Using For Loop in Java");

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

       

        System.out.print("\tGive a Positive Number : ");

        x = input.nextInt();


        System.out.println();

        System.out.print("\tThe factors of the " + x + " are: ");

        for (i = 1; i <= x; ++i) {

            if (x % i == 0) {

                System.out.print(i + " ");

            }

            ++i;

        }

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

        System.out.print("\tDo you want to continue (Type y or n) : ");

        ch = input.next().charAt(0);                        

       } while (ch == 'Y'|| ch == 'y');  

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

        System.out.print("\tTHANK YOU FOR USING THIS PROGRAM");

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

        input.close();

    }

}


Days Into Years, Weeks, and Days in Java