Wednesday, November 28, 2018

Simple Product Information System in C++

Here is a simple program that I wrote simple product information system in C++.

I am currently accepting programming work, it projects, school 

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

My personal website is http://www.jakerpomperada.com



Program Listing

#include <iostream>
#include <iomanip>
#include <stdlib.h>

using namespace std;

int main()
{
string product;
float price=0.00;
int quantity=0;
float total_cost=0.00;
cout << "Simple Product Information System";
cout << "\n\n";
setprecision(2);
cout << "Give Product Name : ";
getline(cin,product);
cout << "Product Price : ";
cin >> price;
cout << "Product Quantity : ";
cin >> quantity;
total_cost = (price * quantity);
cout << "\n\n";
cout << "===== Display Report =====";
cout << "\n\n";
cout << "Product Name   :     " << product << "\n";
cout << "Product Price  : PHP " << price << "\n";
cout << "Quantity       :     " << quantity << "\n";
cout << "\n\n";
cout << "Total Cost     : PHP " << total_cost;
cout << "\n\n";
cout << "End of Program";
cout << "\n\n";
system("pause");
}

Addition of Three Numbers Using Functions in C++

A very simple program that I wrote using C++ functions to add three numbers.

I am currently accepting programming work, it projects, school 

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

My personal website is http://www.jakerpomperada.com



Program Listing

#include <iostream>

using namespace std;

int addition(int a, int b, int c);


int main()
{
int x=0,y=0,z=0;
int add=0;
system("color F0");
x=1;
y=2;
z=3;
 
add = addition(x,y,z);
cout <<"The given values are " << x <<","
    << y << ", and " << z << ".";
cout <<"\n\n";
cout << "The total sum is  " << add << ".";
cout <<"\n\n";
}

int addition(int a, int b, int c)
{
return(a+b+c);
}



Calculator Using Switch Statement in C++

Here is a very simple calculator that I wrote using C++ that uses a switch statement.

I am currently accepting programming work, it projects, school 

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

My personal website is http://www.jakerpomperada.com



Program Listing

#include <iostream>

using namespace std;

int main()
{
    char opt;
    float num1, num2;

    cout << "\t Switch Calculator in C++";
    cout << "\n\n";
    cout << "\t Enter an operator (+, -, *, /): ";
    cin >> opt;

    cout << "Enter two operands: ";
    cin >> num1 >> num2;
    cout << "\n\n";
    
    switch (opt) 
    {
        case '+':
            cout <<"\t " << num1 << " + " << num2 << " = " << num1+num2;
            break;
        case '-':
            cout << num1 << " - " << num2 << " = " << num1-num2;
            break;
        case '*':
            cout <<"\t " << num1 << " * " << num2 << " = " << num1*num2;
            break;
        case '/':
            cout <<"\t " <<num1 << " / " << num2 << " = " << num1/num2;
            break;
        default:
              cout << "\t Error! operator is not correct. Try Again";
            break;
    }
    
    cout << "\n\n";
    cout << " End of Program ";
    cout << "\n\n";
    return 0;
}


Tuesday, November 27, 2018

Palindrome in C Using Pointers

A very simple program that will ask the user to give a string and then the program will check and determine if the given string is a palindrome or not using pointers in C.

I am currently accepting programming work, it projects, school 

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

My personal website is http://www.jakerpomperada.com



Sample Program Output



Program Listing

#include <stdio.h>
 
void stringUpr(char *s);
void stringLwr(char *s);
 
int main()
{
char string[100];
char *ptr,*rev;
printf("\n\n");
printf("\tPalindrome Program ");
printf("\n\n");
printf("\tGive a String : ");
gets(string);
ptr=string;
stringUpr(ptr);
   while(*ptr!=NULL){
      ++ptr;
       }
      --ptr;
for(rev=string; ptr>=rev;){
   if(*ptr == *rev)
       {
        --ptr;
        rev++;
      }
    else
break;
    }

if(rev>ptr) {
   printf("\n\n");
   stringUpr(string);
   printf("\tThe given string %s is Palindrome.",string);
     }
 else {
   printf("\n\n");
   stringUpr(string);
   printf("\tThe given string %s is Not a Palindrome.",string);
}
  printf("\n\n");
  printf("\tEND OF PROGRAM");
  printf("\n\n");
}

void stringLwr(char *s)
{
    int i=0;
    while(s[i]!='\0')
    {
        if(s[i]>='A' && s[i]<='Z'){
            s[i]=s[i]+32;
        }
        ++i;
    }
}
 
void stringUpr(char *s)
{
    int i=0;
    while(s[i]!='\0')
    {
        if(s[i]>='a' && s[i]<='z'){
            s[i]=s[i]-32;
        }
        ++i;
    }
    
}


Average Grade Solver in C Using Pointers

Here is a sample program to solve the average grade of the student using pointers in C.

I am currently accepting programming work, it projects, school 

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

My personal website is http://www.jakerpomperada.com



Sample Program Output


Program Listing

/* average_grade.c
   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
   Date     : November 26, 2018  Monday  9:07 AM
   Location : Bacolod City, Negros Occidental
   Tool     : Dev C++ Version 5.11
   Website  : http://www.jakerpomperada.com
   Email    : jakerpomperada@jakerpomperada.com and jakerpomperada@gmail.com
*/
#include <stdio.h>
int main()
{
 float solve_average=0.00;
 float prelim=0.00,midterm=0.00,final=0.00;
 float *prelim_p, *midterm_p, *final_p;
 
 printf("\n\n");
 printf("\tAverage Grade Solver");
 printf("\n\n");
 printf("\tGive Prelim Grade   : ");
 scanf("%f",&prelim);
 printf("\tGive Midterm Grade  : ");
 scanf("%f",&midterm);
 printf("\tGive Final Grade    : ");
 scanf("%f",&final);
  
 prelim_p = &prelim;
 midterm_p = &midterm;
 final_p = &final;
  
solve_average =(*prelim_p+*midterm_p+*final_p)/3;
 
printf("\n\n");
printf("\t===== DISPLAY RESULTS =====");
printf("\n\n");
printf("\tThe student average grade is %.2f.",solve_average);
printf("\n\n");
printf("\tEND OF PROGRAM");
printf("\n\n");
}



Addition of Three Numbers in C using Pointers

A program that I wrote for my upcoming book on C programming this program will ask the user to give three numbers and the program will solve the total sum of the three numbers using pointers in C.

I am currently accepting programming work, it projects, school 

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

My personal website is http://www.jakerpomperada.com


Sample Program Output


Program Listing

#include <stdio.h>

int main()
{
   int first=0, second=0,third=0; 
   int *a,*b,*c;
   int sum=0;
   printf("\n\n");
   printf("\tAddition of Three Numbers");
   printf("\n\n");
   printf("\tGive Three Numbers : ");
   scanf("%d%d%d",&first,&second,&third);
   a = &first;
   b = &second;
   c = &third;
  sum = *a + *b + *c;
  printf("\n\n");
  printf("\t===== DISPLAY RESULTS =====");
  printf("\n\n");
  printf("\tThe total sum of %d, %d and %d is %d."
          ,first,second,third,sum);
  printf("\n\n");
  printf("\tEND OF PROGRAM");
  printf("\n\n");
 }


Sum and Difference of Two Numbers Using Pointers in C

A simple program that I wrote using C language that will ask the user to give two numbers and then the program will compute the sum and difference of the two numbers using pointers in C.

I am currently accepting programming work, it projects, school 

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

My personal website is http://www.jakerpomperada.com


Sample Program Output


Program Listing

/* add_subtract.c
   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
   Date     : November 27, 2018  Monday  9:21 PM
   Location : Bacolod City, Negros Occidental
   Tool     : Dev C++ Version 5.11
   Website  : http://www.jakerpomperada.com
   Email    : jakerpomperada@jakerpomperada.com and jakerpomperada@gmail.com
*/
#include <stdio.h>
 
int main()
{
   int first=0, second=0;; 
   int *a,*b;
   int sum=0;
   int difference=0;
   printf("\n\n");
   printf("\tSum and Difference of Two Numbers");
   printf("\n\n");
   printf("\tGive Two Numbers : ");
   scanf("%d%d",&first,&second);
   a = &first;
   b = &second;
  sum = (*a + *b);
  difference = (*a - *b);
  printf("\n\n");
  printf("\t===== DISPLAY RESULTS =====");
  printf("\n\n");
  printf("\tThe sum of %d and %d is %d."
          ,first,second,sum);
  printf("\n\n");   
  printf("\tThe difference between %d and %d is %d."
          ,first,second,difference);     
  printf("\n\n");
  printf("\tEND OF PROGRAM");
  printf("\n\n");
 }

Tuesday, November 13, 2018

Temperature Converter in C

A simple temperature converter in C that I wrote for my upcoming book in C programming. I hope you will find my work useful currently I am quite busy with my work that why I was not able to update my blog guys.

I am currently accepting programming work, it projects, school 

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

My personal website is http://www.jakerpomperada.com


Sample Program Output


Program Listing

#include <stdio.h>

int main() 
 {
   float celsius=0.00,fahrenheit=0.00;
   system("COLOR F0");
   printf("\n\n");
   printf("\tTemperature Converter");
   printf("\n\n");
   printf("\tGive the temperature in Fahrenheit  : ");
   scanf("%f", &fahrenheit);
   
   celsius = (fahrenheit-32) * 5 / 9;
      
   printf("\n\n");
   printf("\tThe temperature in Celsius is %.2f\370C.",celsius);
   printf("\n\n");
   printf("\tEND OF PROGRAM");
   printf("\n\n");
}





Loan Interest Solver in C

In this article, I would like to share with you a simple program that I wrote using C language for my new book that I am working right now I named this program Loan Interest Solver in C to solve the interest rate of the loan of the client. I hope you like my program. Thank you.

I am currently accepting programming work, it projects, school 

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

My personal website is http://www.jakerpomperada.com



Sample Program Output

Program Listing


/* interest.c
   Author   : Jake Rodriguez Pomperada,BSCS,MAED-IT
   Date     : November 11, 2018   9:49 PM
   Location : Bacolod City, Negros Occidental
   Website  : http://www.jakerpomperada.com
   Email    : jakerpomperada@jakerpomperada.com
*/

#include <stdio.h>

int main()
{
    float principal=0.00, time=00;
float rate=0.00, solve_interest=0.00;
    
system("COLOR F0");
printf("\n\n");
    printf("\tLoan Interest Solver");
printf("\n\n");
    printf("\tEnter Principal Amount PHP : ");
    scanf("%f",&principal);
    printf("\n");
    printf("\tEnter No. of Years  : ");
    scanf("%f",&time);
    printf("\n");
    printf("\tEnter Percent Rate % : ");
    scanf("%f",&rate);
     
    solve_interest = (principal * time * rate) / 100;

  printf("\n\n");
    printf("\tThe Interest is PHP %.2f.",solve_interest);
    printf("\n\n");
printf("\tEnd of Program"); 
printf("\n\n");
  }





Thursday, November 1, 2018

Addition of Two Numbers Using Two Dimensional Array in C++

In this article I would like to share with you guys how to create a program using C++ to add two numbers using two-dimensional array. 

I am currently accepting programming work, it projects, school 

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

My personal website is http://www.jakerpomperada.com



Sample Program Output


Program Listing

// Addition of two numbers using two dimensional array
// November 1, 2018  Thursday
// Author: Mr. Jake R. Pomperada,MAED-IT
// www.jakerpomperada.com
// jakerpomperada@gmail.com
// jakerpomperada@jakerpomperada.com
// Product of Bacolod City, Negros Occidental Philippines

#include <iostream>

using namespace std;

int main()
{
int a[1][1];
char reply;
int sum=0;
do {

cout <<"\n\n";
cout << "Addition of Two Numbers Using Two Dimensional Array in C++";
cout <<"\n\n";
cout << "Enter first number : ";
cin >> a[0][0];
cout <<"Enter second number : ";
cin >> a[0][1];
sum = (a[0][0]) + (a[0][1]);
cout <<"\n\n";
cout << "The total sum is " << sum <<".";
cout <<"\n\n";
cout <<"Do you want to continue? Y/N : ";
cin >> reply;
} while(toupper(reply)=='Y');
cout <<"\n\n";
cout <<"\tEnd of Program";
cout <<"\n\n";
}