Categories
C++

Product of Two Numbers in Pointers Using C++

 A simple program to ask the user to give two numbers that will compute the product of two numbers using pointers 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 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com

Program Listing

// product.cpp
// Jake Rodriguez Pomperada, MAED-IT, MIT
// www.jakerpomperada.blogspot.com   www.jakerpomperada.com
// jakerpomperada@gmail.com

#include <iostream>


int main()
{
    int val1=0,val2=0;      
    int *ptr1,*ptr2;   
    int solve_product = 0;
                 
    std::cout << "\n\n";
    std::cout << "\tProduct of Two Numbers in Pointers Using C++";
    std::cout << "\n\n";
    std::cout << "\tGive First Value  : ";
    std:: cin>>val1;   
    std::cout << "\n\n";                        
    std::cout << "\tGive Second Value : ";
    std:: cin>>val2;                          

    ptr1=&val1;                                      
    ptr2=&val2;

    // Solving the product here
    solve_product=*ptr1 * *ptr2;                                 

    std::cout << "\n\n";
    std::cout << "\tThe product of " << val1 << " and " << val2 
    << " is " << solve_product << ".";
    std::cout << "\n\n";
    std::cout << "\tEnd of Program";
    std::cout << "\n\n";
    system("pause");
    
}
Categories
C++

General Average Grade Solver With Remarks in C++

 A simple program to compute the average grade of the student with remarks that I wrote 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 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com

Program Listing

// general_average.cpp
// Author  : Jake Rodriguez Pomperada,MAED-IT, MIT
// Website : www.jakerpomperada.com / www.jakerpomperada.blogspot.com
// Date   : April 10, 2021   Saturday  9:30 AM
// Email  : jakerpomperada@gmail.com

#include <iostream>
#include <string.h>

using namespace std;

// Prelim - 0.20, Midterm - 0.30, Finals = 0.50

int main() 
{
 int prelim=0, midterm=0,finals=0;
 int solve_grade;
 
 char subject[100];

    cout <<"\n\n";
 cout <<"\tGeneral Average Grade Solver With Remarks in C++";
 cout <<"\n\n";
 cout <<"\tSubject Name : ";
 gets(subject);
 
 cout <<"\tEnter Prelim Grade : ";
 cin >> prelim;
 cout <<"\tEnter Midterm Grade : ";
 cin >> midterm;
 cout <<"\tEnter Final Grade : ";
 cin >> finals;
 
 solve_grade = (prelim * 0.2) +
               (midterm * 0.3) +
      (finals * 0.5);   
 
 
 cout <<"\n\n";
 cout << "\tSubject : " << subject;
 cout <<"\n\n";
 cout <<"\tYou general average grade is "
     << solve_grade <<".";
cout << "\n\n\n";

if (solve_grade >= 75) {
		cout << "\tYou Passed the Subject this semester.";
} else {
	cout << "\tYou Failed the Subject this semester.";
}
 cout <<"\n\n";
 cout <<"\tEnd of the Program";
}