Categories
C

Volume of a Sphere Converter in C

 A simple program that I wrote that will ask the user to give value in radius and then the program will compute the volume of a sphere using C programming language.I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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

#include <stdio.h>

#define PI  3.14

int main()
{   
    float volume_sphere = 0.00;
    float radius = 0.00;
   	printf("\n\n");
	printf("\tVolume of a Sphere Converter");
	printf("\n\n");
	printf("\tEnter Radius Value : ");
    scanf("%f",&radius);

    /* Compute the volume of Sphere */
    
    volume_sphere = (4.0/3.0)*(PI*radius*radius*radius);
    
	printf("\n\n");
	printf("\tThe Volume of Sphere is %5.2f.",volume_sphere);
	printf("\n\n");
	printf("\tEnd of Program");
	printf("\n");
}
Categories
C

Payroll Program in C

A simple payroll program that I wrote using the C programming language.
I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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.comI am also a book author you can purchase my books on computer programming and information technology in the following links below. https://www.unlimitedbooksph.com/

#include <stdio.h>

#define RATE_PER_DAY 84.50

int main()
{   
    char emp_name[200];
	int days = 0;
    float  solve_salary = 0.00;
   	printf("\n\n");
	printf("\tPayroll Program in C");
	printf("\n\n");
	printf("\tEmployee's Name  : ");
    gets(emp_name);
	printf("\tNo. Day's Worked : ");
    scanf("%d",&days);

    /* Compute the employee's salary */
    
    solve_salary = (days *  RATE_PER_DAY); 
    
	printf("\n\n");
	printf("\t===== DISPLAY RESULT =====");
	printf("\n\n");
	printf("\tEmployee's' Name     : %s",emp_name);
	printf("\n");
	printf("\tEmployee's Salary    : PHP %5.2f.",solve_salary);
	printf("\n\n");
	printf("\tEnd of Program");
	printf("\n");
}

Categories
C

Sum and Product of Numbers in C

A simple program that I wrote using a C programming language to ask the user to give two numbers and then the program will sum and compute the product of the two given numbers and display the results on the screen.
I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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.comI am also a book author you can purchase my books on computer programming and information technology in the following links below. https://www.unlimitedbooksph.com/

#include <stdio.h>

int main()
{   
    int a=0,b=0,sum=0,product=0;
   	printf("\n\n");
	printf("\tSum and Product of Numbers in C");
	printf("\n\n");
	printf("\tGive Two Numbers : ");
    scanf("%d%d",&a,&b);

    /* Compute Sum and Product of Two Numbers */
    
    sum = (a + b);
	
	product = (a * b); 
    
	printf("\n\n");
	printf("\t===== DISPLAY RESULTS =====");
	printf("\n\n");
	printf("\tThe sum of %d and %d is %d.",a,b,sum);
	printf("\n");
	printf("\tThe product of %d and %d is %d.",a,b,product);
	printf("\n\n");
	printf("\tEnd of Program");
	printf("\n");
}

Categories
C

Volume of a Sphere Converter in C

A simple program that I wrote using C programming language to compute the volume of a sphere.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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.unlimitedbooksph.com/

Sample Program Output

Program Listing

#include <stdio.h>

#define PI  3.14

int main()
{   
    float volume_sphere = 0.00;
    float radius = 0.00;
   	printf("\n\n");
	printf("\tVolume of a Sphere Converter");
	printf("\n\n");
	printf("\tEnter Radius Value : ");
    scanf("%f",&radius);

    /* Compute the volume of Sphere */
    
    volume_sphere = (4.0/3.0)*(PI*radius*radius*radius);
    
	printf("\n\n");
	printf("\tThe Volume of Sphere is %5.2f.",volume_sphere);
	printf("\n\n");
	printf("\tEnd of Program");
	printf("\n");
}
Categories
C

US Dollar To Philippine Peso Converter in C

I wrote this simple program to ask the user to give US dollar values and then the program will convert the given us dollar values into Philippine peso equivalent.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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.comI am also a book author you can purchase my books on computer programming and information technology in the following links below. https://www.unlimitedbooksph.com/

Sample Program Output

Program Listing

#include <stdio.h>

#define PHIL_PESO  50.74

int main()
{   
    float convert = 0.00, us_dollar = 0.00;
   
   	printf("\n\n");
	printf("\tUS Dollar To Philippine Peso Converter");
	printf("\n\n");
	printf("\tEnter US Dollar Value : ");
	scanf("%f",&us_dollar);
	
	convert = (us_dollar *  PHIL_PESO);
	  
	printf("\n\n");
	printf("\tThe value of $%2.2f US Dollars in ",us_dollar);
	printf("Philippine Peso is PHP %2.2f.",convert);
	printf("\n\n");
	printf("\tEnd of Program");
	printf("\n");
}
Categories
C

Text File To RTF in C

A program written Ben a.k.a DreamVB that I like to share to A small tool to convert text files to RTF files using C programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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.comMy 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.unlimitedbooksph.com/

Program Listing

/*
  TXT2RTF
  A small tool to convert text files to RTF files.

  Author:    Ben a.k.a DreamVB
  Version:   1.0
  Type:      Open Source
  Contact:   dreamvb@outlook.com {for any questions regarding this program}
*/
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define EXIT_IF(cnd) {if((cnd)) perror(NULL); exit(EXIT_FAILURE);}

void process_char(FILE* output, char ch)
{
  switch(ch)
  {
    case '\r':
      fputs("\\par", output);
      fputc('\r', output);
      break;
    case '\n':
      fputc(ch, output);
      break;
    case '\t':
      fputs("\\tab ", output);
      break;
    case '\\':
      fputs("\\\\", output);
      break;
    case '{':
      fputc('\\', output);
      fputc(ch, output);
      break;
    case '}':
      fputc('\\', output);
      fputc(ch, output);
      break;
    default:
      if ((ch >= 0x20 && (ch <= 0x7F)))
      {
        fputc(ch, output);
      }
      else
      {
        fputs("\\'", output);
        fprintf(output, "%02X", ch);
      }
  }
}

void process_files(FILE* input, FILE* output)
{
  int ch;
  while ((ch = fgetc(input)) != EOF)
  {
    process_char(output, ch);
  }
}

void print_header(FILE* fout, char *font_name, char *font_size)
{
  fputs("{\\rtf1\\ansi\\deff0\\nouicompat{\\fonttbl{\\f0\\fnil\\fcharset0 ", fout);
  fputs(font_name, fout);
  fputs(";}}\r\n", fout);
  fputs("{\\*\\generator DM TXT2RTF 1.0}\\viewkind4\\uc1 \r\n", fout);
  fputs("\\pard\\", fout);
  fputs("fs", fout);
  fputs(font_size, fout);
  fputs("\\lang2057 ", fout);
}

void print_footer(FILE* fout)
{
  fputs("\\par\r\n}\r\n", fout);
  fputc(0, fout);
}

int main(int argc, char* argv[])
{
  FILE *fin = NULL;
  FILE *fout = NULL;
  char sFont[30] = "Consolas";
  char sFontsize[10] = "11";

  if (argc < 3)
  {
    printf("Usage: <InFile> <OutFile> [FontName] [FontSize]\n");
    return 0;
  }

  fin = fopen(argv[1], "rb");
  EXIT_IF(fin == NULL);

  fout = fopen(argv[2], "wb");
  EXIT_IF(fout==NULL);

  if (argc == 4)
    strncpy(sFont, argv[3], sizeof(sFont)-1);

  if (argc == 5)
    strncpy(sFontsize, argv[4], sizeof(sFontsize)-1);

  print_header(fout, sFont, sFontsize);
  process_files(fin, fout);
  print_footer(fout);

  fclose(fin);
  fclose(fout);
  system(argv[2]);
  return 1;
}

Categories
C

Gets Statement in C

A simple program that I wrote to show how to use gets statement using C programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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.comMy programming website is http://www.jakerpomperada.blogspot.comI am also a book author you can purchase my books on computer programming and information technology in the following links below.https://www.unlimitedbooksph.com/


Program Listing

#include <stdio.h>
int main()
{
    char name[100];
    printf("\n\n");
    printf("\tWhat is your name? ");
    gets(name);     /* read string using gets statement */
    printf("\n\n");
    printf("\tHi %s. How are you today? ",name);
	printf("\n\n");
	printf("\t");
	puts(name);    /* display string using puts statement*/
    printf("\n\n");
    printf("\tEnd of Program");
    printf("\n\n");
}
Categories
C

Parallelogram Pattern in C

This program is being written by my good friend and fellow software engineer Sir Ernel G. Fadriquilan thank you very much, Sir, for sharing your code to us.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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.unlimitedbooksph.com/

Program Listing

#include<stdio.h>
int main()
{
    int i,j,k=0,space=1,size;
    printf("Enter size:\n");
    scanf("%d",&amp;size);
    for(i=size;i>=1;i--)
    {
     for(j=1;j<=i;j++)
     {
      printf("%c",i+64);
     }
     if(i!=size)
     {
       for(k=1;k<=space;k++)
       {
         printf(" ");
       }
        space+=2;
     }
     for(j=i;j>=1;j--)
     {
      if(j!=size)
      printf("%c",i+64);
     }
     printf("\n");
    }
   //Reverse printing
    space-=4;
    for(i=2;i<=size;i++)
    {
     for(j=1;j<=i;j++)
     {
      printf("%c",i+64);
     }
     if(i!=size)
     {
       for(k=1;k<=space;k++)
       {
         printf(" ");
       }
        space-=2;
     }
     for(j=i;j>=1;j--)
     {
      if(j!=size)
      printf("%c",i+64);
     }
     printf("\n");
    }
}
Categories
C

Convert String Upper to Lower & Vice Versa in C

This program is being written by my good friend and fellow software engineer Sir Ernel G. Fadriquilan thank you very much, Sir, for sharing your code to us.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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.unlimitedbooksph.com/

Program Listing

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

int main()
{
    int i;
    char str1[100];
    printf("Enter a sentence to convert upper to lower and vice versa\n");
    gets(str1);
for(i=0;i<strlen(str1);i++)
{
    if(islower(str1[i]))
    {
        printf("%c",toupper(str1[i]));
    }
    else if(isupper(str1[i]))
    {
        printf("%c",tolower(str1[i]));
    }
    else
    {
        printf("%c",str1[i]);
    }
}
}
Categories
C

Compute the Sum of two One-Dimensional Using Mallo C

This program is being written by my good friend and fellow software engineer Sir Ernel G. Fadriquilan thank you very much, Sir, for sharing your code to us.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, 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

#include <stdio.h>
#include <conio.h>
#include <malloc.h>
#include <stdlib.h>
int main()
{
    int i, n;
    int *a, *b, *c;
    printf("How many Elements in each array...\n");
    scanf("%d", &amp;n);
    a = (int *)malloc(n * sizeof(int));
    b = (int *)malloc(n * sizeof(int));
    c = (int *)malloc(n * sizeof(int));
    printf("Enter Elements of First List\n");
    for (i = 0; i < n; i++)
    {
        scanf("%d", a + i);
    }
    printf("Enter Elements of Second List\n");
    for (i = 0; i < n; i++)
    {
        scanf("%d", b + i);
    }
    for (i = 0; i < n; i++)
    {
        *(c + i) = *(a + i) + *(b + i);
    }
    printf("Resultant List is\n");
    for (i = 0; i < n; i++)
    {
        printf("%d\n", *(c + i));
    }
    getch();
    return 0;
}