Friday, September 20, 2019

Profit and Loss Sales Solver in C

Write a C program to input cost price and selling price of a product and check profit or loss 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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


Program Listing

#include<stdio.h>

int main ()
{
int cp,sp,amt;
/* cp=cost price, sp=selling price,
amt=amount*/
printf("Enter cost price:");
printf("\n\n");
scanf("%d",&cp);
printf("\n\n");
printf("Enter selling price:");
printf("\n\n");
scanf("%d",&sp);
printf("\n\n");
if(sp>cp)
{
/* Calculate Profit */
amt=sp-cp;
printf("PROFIT=%d",amt);
printf("\n\n");
}
else if(cp>sp)
{
/* Calculate Loss*/
amt=cp-sp;
printf("LOSS=%d",amt);
printf("\n\n");
}
else
{
/* Neither profit nor loss*/
printf("NO PROFIT, NO LOSS");
}
return 0;
}




Count number of lines, words, characters from a file in C++

A simple program that will count the number of lines, words, characters from a file 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.

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

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

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




Sample Program Output



Program Listing

#include <iostream>
#include <fstream>

using namespace std;

int main() {
   ifstream f1;
   char c;
   int numchars, numlines;

   f1.open("test.txt");

   numchars = 0;
   numlines = 0;
   system("COLOR F0");
   cout <<"\n\n";
   cout <<"\tCount number of lines, words, characters from a file";
   cout <<"\n\n";
   f1.get(c);
   while (f1) {
     while (f1 && c != '\n') {
       numchars = numchars + 1;
       f1.get(c);
     }
     numlines = numlines + 1;
     f1.get(c);
   }
   cout << "\tThe file has " << numlines << " lines and " 
     << numchars << " characters.";
   cout <<"\n\n"; 
   cout <<"\tEnd of Program";
   cout <<"\n\n";  
   system("pause");
   
}






Minimum Cost Solver in C

A simple program that will solve for the minimum cost 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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


Program Listing

#include<stdio.h>
#include<conio.h>

int main()
{

float p, cost, p1, cost1;

for(p=0; p<=10; p=p+0.1)
{
cost=40-8*p+p*p;
if(p==0)
{
cost1=cost;
continue;
}
if(cost>=cost1)
break;
cost1=cost;
p1=p;
}
p=(p+p1)/2.0;
cost=40-8;
printf("MINIMUM COST=%.2f AT p=%.1f", cost, p);
}

Commission Sales Solver in C

A simple program to compute the commission's sales of a salesman 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.

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

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

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


Program Listing


#include <stdio.h>
#include <conio.h>

int main ()
{
                int sales;
                float comm;

                printf("Enter Total Sales: ");
                scanf("%d", &sales);
                if(sales<100)
                printf("\nSorry no Commission, Please do more sales!");
                else if (sales>=100 && sales<=500)
                printf("\nCommission: %f", (sales*0.1));
               
                else
                {
                                comm = (sales>=100 && sales<=500);
                                printf("\nCommission:%f", (comm+100));
                }             
               
}

Tax Rate Solver in C

In this article, I would like to share with you guys a simple program written in the C programming language that I called Tax Rate Solver.

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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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


Program Listing


#include<stdio.h>

#define TAXRATE 0.20

main()
{
                float balance;
                float tax;
                balance = 72.10;
                tax = balance *TAXRATE;
                printf("The tax on %.2f is %.2f\n",balance,tax);
               
}


Provident Fund Solver in C

A simple program is written in C programming language to solve for the provident fund.

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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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




Program Listing


#include<stdio.h>

#define EMPLOYEE_PERCENTAGE 12.5f
#define EMPLOYER_PERCENTAGE 12.0f

int main()
{
                float basicPay;
                float employeeFund, employerFund;
               
                printf("Enter basic pay:");
                scanf("%f", &basicPay);
               
                employeeFund=(basicPay/100)*EMPLOYEE_PERCENTAGE;
                employerFund=(basicPay/100)*EMPLOYER_PERCENTAGE;
               
                printf("Basic Pay: %f\n", basicPay);
                printf("Employee contribution: %f\n", employeeFund);
                printf("Employer contribution: %f\n", employerFund);
               
                return 0;
}

Civil Status Checker Using Case Statement in Pascal

In this article, I would like to share with you guys a sample program that will ask the user to give a letter to check what is the civil status of the user using case statement 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.

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

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

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







Sample Program Output


Program Listing

Program Civil_Status_Checker;
Uses Crt;

Var
civil_status : Char;

Begin
   Clrscr;
   Write('Civil Status Checker Using Case Statement in Pascal');
   Writeln;
   Writeln;
   Write('S - Single, M - Married, D - Divorced, W - Window');
   writeln;
   Writeln;
   Write('Select Your Civil Status  : ');
   Readln(civil_status);
   Writeln;
    case civil_status of
     'S','s'   : Writeln('You are still a Single.');
     'M','m'   : Writeln('You are already Married.');
     'D','d'   : Writeln('You are already Divorced.');
     'W','w'   : Writeln('You are a Window.');
     Else
        Writeln('Invalid Civil Status. Try Again.');
     end;
   Writeln;
   Write('End of Program');
   Readln;
End.



Multiplication Table Generator in Pascal

In this sample, the program will generate a multiplication table using nested for loop statement 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.

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

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

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



Sample Program Output



Program Listing

(* multiplcation_table.pas
   Author   : Jake R. Pomperada, MAED-IT
   Date     : September 20, 2019    Friday   4:38 AM
   Location : Barangay Alijis, Bacolod City, Negros Occidental
   Email    : jakerpomperada@gmail.com
*)

Program Multiply_Table;
Uses Crt;

Var row,column  : integer;

Begin
  Clrscr;
   writeln;
   gotoxy(18,2);
   write('MULTIPLICATION TABLE IN PASCAL');
   writeln;
   For row := 1 to 12 Do
    Begin
        writeln;
   For column := 1 to 12 Do

     Begin
          write(row * column:5);
       End;
   End;

  Readln;
End.



Thursday, September 19, 2019

Addition of Two Numbers Using Do While 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 of the two numbers and display the results on the screen. In addition, the program will ask the user if the user would like to repeat running the program all over again.

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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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



Sample Program Output


Program Listing

/* sum.c
   Written By: Jake R. Pomperada,MAED-IT
   September 19, 2019  */

#include <stdio.h>
#include <ctype.h>

int main() {
int x=0,y=0,sum=0;
char ch;
do {
printf("\n");
printf("\tAddition of Two Numbers Using Do While in C");
printf("\n\n");
printf ("\tEnter the first number : ");
scanf ("%d",&x);
printf ("\tEnter the second number : ");
scanf ("%d",&y);
sum=x+y;
printf("\n");
printf ("\tThe total number is: %d\n",sum);
printf("\n\n");
printf ("\tDo you want to repeat the operation Y/N: ");
scanf (" %c", &ch);
} while (toupper(ch) == 'Y');
printf("\n\n");
printf ("\tEnd of Program");
printf("\n\n");
}

Search and Replace a String in C++


Write a program that will ask the user to give a sentence and then the program will ask the user what word in the given sentence to be replaced and the program will ask the user again what is the replacement word. After which the program will search and replace the word from the sentence and display the new sentence on the screen.

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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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


Sample Program Output


Program Listing

 search.cpp

// search.cpp
// Author    : Mr. Jake R. Pomperada, BSCS,MAED-IT
// Date      : September 2, 2018   Sunday  7:06 PM
// Location  : Bacolod City, Negros Occidental Philippines.
// Website   : http://www.jakerpomperada.com
// Email     : jakerpomperada@jakerpomperada.com and jakerpomperada@gmail.com


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

using namespace std;


int main()
{
   char str[100],s[100],r[100],result[100];
   int a=0,b=0,c=0,m=0,k=0;

   system("COLOR F0");  
   cout << "\n\n";
    cout << "\tSearch and Replace a String";
    cout << "\n\n";
    cout << "\tGive a String : ";
    gets(str);
    cout <<"\n";
    cout << "\tGive the string to be search : ";
    gets(s);
    cout <<"\n";
    cout <<"\tEnter replace string : ";
    gets(r);
a = m = c = b = 0;
while ( str[c] != '\0')
{
if (str[m] == s[a] ) 
{
a++;
m++;
if ( s[a] == '\0') 
{
for(k=0; r[k] != '\0';k++,b++)
result[b] = r[k];
a=0;
c=m;
}
}
else 
{
result[b] = str[c];
b++;
c++;
m = c;
a=0;
}
}
    result[b] = '\0';
cout <<"\n\n";
cout <<"\tDISPLAY RESULT";
cout <<"\n\n";
cout << "\tThe result string :=> " << result;
cout <<"\n\n";
return 0;
} // End of Program