Categories
C++

Palindrome Number Checker in C++

I wrote this program that will ask the user to give integer and then the program will determine and check if the given number is a palindrome or not a palindrome 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.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

My video tutorial on my YouTube Channel.
Sample Program Output
Sample Program Output

Program Listing

palindrome.cpp

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

using namespace std;


int main()
{
    int n=0,num=0,digit=0,rev=0;
    
    cout <<"\n\n";
    cout <<"\tPalindrome Number Checker in C++ ";
    cout <<"\n\n";
    cout <<"\tGive a Positive Number : ";
    cin >> num;
    
    n = num;
    
    do {
        digit = num % 10;
        rev   = (rev * 10) + digit;
        num = num / 10;
        } while (num !=0);
        
    cout << "\tThe reverse of number is " << rev <<"\n";
    cout <<"\n\n";
    if (n == rev) {
          cout << "\tThe given number " << n<< " is a Palindrome.";
          }
         else {
                    cout << "\tThe given number " << n << " is  Not a Palindrome.";    
              }
                     
    cout <<"\n\n";
    cout << "\tEnd of the Program"; 
    cout <<"\n\n";     
    system("pause");
     }
     
Categories
C++

Leap Year Checker in C++

I wrote this simple program in C++ to ask the user to give a year and then the program will check and determine if the year is a leap year or not a leap 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 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.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

My tutorial video in my YouTube channel

Sample Program Output
Sample Program Output

Program Listing

leap_year.cpp

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

using namespace std;

int main()
{
    int year=0;

    cout <<"\n\n";
    cout <<"\tLeap Year Checker in C++";
    cout <<"\n\n";
    cout <<"\tGive a Year : ";
    cin >> year;
    cout <<"\n\n";
        
    if (year % 4 == 0) 
    {
      if (year % 100 == 0) 
       {
          if (year % 400 == 0)
               cout <<"\t"<< year << " is a Leap Year.";
             else
               cout <<"\t"<< year << " is Not a Leap Year.";              
       }       
     else 
        cout <<"\t"<< year << " is a Leap Year.";
        }
     else 
      cout <<"\t"<< year << " is Not a Leap Year.";    
      
    cout <<"\n\n";
    cout <<"\tEnd of Program";
    cout <<"\n\n";  
    system("pause");
}
Categories
C++

Area of the Circle in C++

I wrote this simple program in C++ to ask the user to give a radius value and then the program will compute the area of the circle using the 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.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Program Listing


area_circle.cpp

#include <iostream>
#include <iomanip>

using namespace std;

const float PI = 3.1416;

float solve_area(int r);

float solve_area(int r)
{
    float area=0.00;

    area = (PI * r * r);
    cout << "\n\n";
    cout << setprecision(2) << fixed;
    cout << "The are of the circle is "
         << area << ".";
    cout << "\n\n";
    system("pause");
}

 main()
 {
      int radius=0;
      cout << "\t   AREA OF THE CIRCLE ";
      cout << "\n\n";
      cout << "Enter the radius :=> ";
      cin >> radius;
      solve_area(radius);
 }









Categories
C

String Palindrome in C

A simple program that I wrote to ask the user to give a string and then the program will check if the given string is a palindrome or not a palindrome 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.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

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

My programming website is http://www.jakerpomperada.blogspot.com
I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output

Sample Program Output
My video tutorial on my YouTube channel

Program Listing

palindrome.c

#include <stdio.h>
#include <string.h>
#include <stdlib.h>


int main() {
    char a[200], b[200];
    
    printf("\n\n");
    printf("\tString Palindrome in C");
    printf("\n\n");
    printf("\tGive a String : ");
    gets(a);
    
    strcpy(b,a);
    strrev(b);
    
    printf("\n");
    if (strcmp(a,b) == 0) {
        printf("\tThe given string %s is a Palindrome.",a);
        }
     else {
        printf("\tThe given string %s is Not a Palindrome.",a);
                          
     } 
    printf("\n\n");
    printf("\tEnd of Program");
    printf("\n\n");
    system("pause");
}  
    
Categories
C

Arithmetic Mean in C Language

I wrote this program to ask the user how many items to be processed and then the program will ask the series of numbers and then the program will compute the arithmetic mean using the 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.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


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

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output
Sample Program Output

Program Listing

mean.c

#include<stdio.h>


int main()
{
	int n=0, i=0, arr[100], sum=0;
	int solve_mean=0;
	
	printf("\n\n");
	printf("\tArithmetic Mean in C Language");
	printf("\n\n");
	printf("\tHow many items? : ");
	scanf("%d",&n);
	printf("\n");
	for(i=0; i<n; i++)
	{
		printf("\tEnter item no. %d : ",i+1);
		scanf("%d",&arr[i]);
		sum=sum+arr[i];
	}
	solve_mean=(sum/n);
	printf("\n");
	printf("\tThe Arithmetic Mean is %d.",solve_mean);
	printf("\n\n");
	printf("\tEnd of Program");
	printf("\n");
}
Categories
C++

College Student Grading System in C++ Programming Language

I wrote this simple program to compute the grade of a college student using C++ as my 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.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com
I am also a book author you can purchase my books on computer programming and information technology in the following links below.


https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output

Program Listing

grades.cpp

#include<iostream>
#include<string>
using namespace std;
int main(){
    string choice;
    string fname, lname, section, course;
    double grade, pg, mg, eg;
    do
    {
        system("cls");
        cout<<"--- Enter choice ---"<<endl;
        cout<<"(1) Enter Student's Data"<<endl;
        cout<<"Type exit/quit to terminate program"<<endl;
        cout<<"#";cin>>choice;
        if (choice=="1")
        {
            cout<<"--- Students Information ---"<<endl;
            cout<<"--- First Name   :";cin>>fname;
            cout<<"--- Last Name    :";cin>>lname;
            cout<<"--- Section      :";cin>>section;
            cout<<"--- Course       :";cin>>course;
            cout<<"--- Students Grading Information ---"<<endl;
            cout<<"--- Prelim Grade :";cin>>pg;
            cout<<"--- Midterm Grade:";cin>>mg;
            cout<<"--- Endter Grade :";cin>>eg;
            grade = (pg*.3)+(mg*.3)+(eg*.4);
            system("cls");
            cout<<"--- Printing Student's Information ---"<<endl;
            cout<<"--- "<<lname<<", "<<fname<<" "<<endl;
            cout<<"--- Course and Section ---"<<endl;
            cout<<"--- Course       :"<<course<<endl;
            cout<<"--- Section      :"<<section<<endl;
            cout<<"--- Final Grade  :"<<grade<<endl;
            cout<<"--- Press 'c' to return to menu ---"<<endl;
            cin>>choice;
        }
        else
        {
            break;
        }
    }
    while(choice!="exit" || choice!="quit");
return 0;
}
Categories
C++

Making a Directory in C++

In this article, I would like to share with you guys a code that will create a directory using C++ as my programing 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.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com
I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Program Listing

directory.cpp

#include<iostream>

#include<dir.h>

using namespace std;

int main(){
    char dir[200];
    cin>>dir;
    mkdir(dir);
return 0;
}
Categories
C++

Count Number of Words and Digits in a Sentence in C++

I wrote this program to ask the user to give a sentence and then the program will count the number of words and digits in the sentence and display the results on the screen 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.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

Home

https://www.unlimitedbooksph.com/

Program Listing

count.cpp

// Word and Number Counter 1.0 in C++
// Author : Mr. Jake Rodriguez Pomperada, MAED - Instructional Technology
// Date   : October 3, 2009 Saturday
// Email  : jakerpomperada@yahoo.com


#include <iostream>
#include <string>
#include <cctype>


using namespace std;

// Function to count the words in the sentence

 int WordCount(string sentence)
{
    int length = sentence.length();
    int words = 1;

    for (int size = 0; length > size; size++)
    {

       if (sentence[size] == ' ' && sentence[size-1] != ' ')
         words++;      // Count the words if there is a space
    }
    if ( sentence[0] == ' '/*space*/ )
      words--;
    return words ;
}


// Function to count digits in the sentence

 int NumCount(string sentence)
{
   int digits=0,count=0;

  char c;

while ( sentence[count] != '\0' && sentence[count] != '\n' ) {
  c = toupper( sentence[count] );

    if(c>='0'&& c<='9') {

	digits++;
    }
count++;
}
 return digits;

}


main()
 {
     char string2[500];

     cout << "\n\n\t\t  WORD AND NUMBER COUNTER 1.0 in C++ ";
     cout << "\n\n\t  Created By: Mr. Jake Rodriguez Pomperada, MAED-IT";
     cout << "\n\n\n";

     cout << "Enter a sentence :=> ";
     cin.getline(string2,500);

     cout << "\n\n\n";
     cout << "\n\t === GENERATED REPORT === ";
     cout << "\n\nThe number of word(s) in the sentence is "
          << WordCount(string2) << ".";
     cout << "\n\nThe number of digits(s) in the sentence is "
          << NumCount(string2) << ".";
     cout << "\n\n";

   system("PAUSE");
 } // End of Code

Categories
C++

Global and Local Variables in C++

Here is a simple program in C++ programming langage to show how to declare and use local and global variables.

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.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.


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

My programming website is http://www.jakerpomperada.blogspot.com


I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Program Listing

variables.cpp

#include<iostream>

using namespace std;

int Displayg_var();
int Func1();
int Func2();

int g_var=0;

int main()
{

    Displayg_var();
                                          system("Pause");
    g_var=6;
                                          system("Pause");
    Displayg_var();
                                          system("Pause");
    Func1();
                                          system("Pause");
    Displayg_var();
                                          system("Pause");
    Func2();

    system("Pause");
    return 0;
}

int Displayg_var()
{
    cout<<"\n\nThe Value of v_gar now is: "<<g_var<<endl;
}

int Func1()
{
    g_var=3;
}

int Func2()
{
    int g_var;

    g_var=101;
    cout<<"\n\nThe value of g_var(local variable) inside Func2 is: "<<g_var<<endl;
}
Categories
C++

Highest To Lowest Salary in C++ Language

I wrote this program to sort the name and salary of the employees from highest to lowest using the 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.

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

Here in Bacolod City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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

My programming website is http://www.jakerpomperada.blogspot.com

Sample Program Output

Program Listing

salary.cpp

//  salary.c
//   Author : Jake R. Pomperada,MAED-IT
//   December 22, 2019    10:09 AM
//   Monday
//   Bacolod City, Negros Occidental Philippines 
//   www.jakerpomperada.com
//   jakerpomperada@gmail.com

#include <iostream>
#include <iomanip>

using namespace std;

struct employee
{
    double salary ;
    char emp_name[200];
}emp_records[200],t;

int main()
{
    int i=0,j=0,n=0;
    cout <<"\n\n";
    cout <<"\tHighest To Lowest Salary in C++ Language";
    cout <<"\n\n";
    cout <<"\tHow many employees? : ";
    cin >> n;
	   
    for(i=0;i<n;i++)
    {
         cin.ignore();
         cout <<"\tGive Employees Name   : ";
         cin.getline(emp_records[i].emp_name,100);
        
       
         cout <<"\tGive Employees Salary : ";
         cin >>emp_records[i].salary;
    }
    
    for(i=0;i<n;i++)
    {
        for(j=0;j<n-1;j++)
        {
            if(emp_records[j].salary<emp_records[j+1].salary)
            {
                t=emp_records[j];
                emp_records[j]=emp_records[j+1];
                emp_records[j+1]=t;
            }
        }
    }
    cout<<"\n\n";
    cout <<"\tEmployees that has the Highest to Lowest Salary\n\n";
    cout <<setw(25)<<" EMPLOYEES NAME" <<setw(15)<<"SALARY\n";
    cout <<setw(20)<<"-------------------------------------------------\n\n";
    
    for(i=0;i<n;i++)
    {
       cout <<fixed;
	   cout <<setw(25)<<emp_records[i].emp_name <<setw(12)<<"PHP "<<setprecision(2)
	   <<emp_records[i].salary<<"\n""";
    }
    cout <<"\n\n";
    cout <<"\tEnd of Program";
    cout<<"\n\n";
}