Learn Computer Programming Free from our source codes in my website.
Sponsored Link Please Support
https://www.techseries.dev/a/27966/qWm8FwLb
https://www.techseries.dev/a/19181/qWm8FwLb
My Personal Website is http://www.jakerpomperada.com
Email me at jakerpomperada@gmail.com and jakerpomperada@yahoo.com
Thursday, October 27, 2022
Ternary Operator in C#
A simple program that I wrote using C# programming language to show how to declare and use ternary operator.
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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
You can buy my C++ book online at
https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/
You can buy my book in introduction to computer networking at
https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking
Want to support my channel?
GCash Account
Jake Pomperada
09173084360
Paypal
https://paypal.me/jakerpomperada
Patreon
https://www.patreon.com/jakerpomperada
Thank you very much for your support.
Program Listing
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ternary
{
class Program
{
static void Main(string[] args)
{
int a = 0, b = 0, c = 0;
a = 10;
b = 5;
c = (a > b) ? a : b;
Console.WriteLine("\n");
Console.WriteLine("\tTernary Operator in C");
Console.Write("\n\n");
Console.WriteLine("\tThe result is {0}.",c);
Console.Write("\n\n");
Console.Write("\tEnd of Program");
Console.WriteLine();
Console.ReadKey();
}
}
}
Wednesday, October 26, 2022
Ternary Operator in C
A simple program that I wrote using C programming language to show how to declare and use ternary operator.
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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
You can buy my C++ book online at
https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/
You can buy my book in introduction to computer networking at
https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking
Want to support my channel?
GCash Account
Jake Pomperada
09173084360
Paypal
https://paypal.me/jakerpomperada
Patreon
https://www.patreon.com/jakerpomperada
Thank you very much for your support.
Program Listing#include <stdio.h> int main() { int a=0,b=0,c=0; a=10; b=5; c = (a>b) ? a : b; printf("\n"); printf("\tTernary Operator in C"); printf("\n\n"); printf("\tThe result is %d.",c); printf("\n\n"); printf("\tEnd of Program"); printf("\n\n"); }
Tuesday, October 25, 2022
Philippine Peso to Other Currencies in C#
In this tutorial I wrote this program to ask the user to give Philippine Peso value and convert it to other currencies like hongkong dollar, uae derham, us dollar, and japanese yen using C# programming language.
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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
You can buy my C++ book online at
https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/
You can buy my book in introduction to computer networking at
https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking
Want to support my channel?
GCash Account
Jake Pomperada
09173084360
Paypal
https://paypal.me/jakerpomperada
Patreon
https://www.patreon.com/jakerpomperada
Thank you very much for your support.
Program Listing
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
double php_peso = 0.00;
double hk_dollar = 0.00, uae_dirham = 0.00;
double us_dollar = 0.00, jpn_yen = 0.00;
Console.Write("\n\n");
Console.Write("\tPhilippine Peso to Other Currencies in C#");
Console.Write("\n\n");
Console.Write("\tGive Philippine Peso Value : ");
php_peso = Convert.ToDouble(Console.ReadLine());
Console.Write("\n\n");
hk_dollar = (php_peso * 0.16137);
uae_dirham = (php_peso * 0.07646);
us_dollar = (php_peso * 0.02081);
jpn_yen = (php_peso* 2.1612);
Console.Write("\tHong Kong Dollar : {0:0.00}\n ",hk_dollar);
Console.Write("\tUAE Dirham : {0:0.00}\n ",uae_dirham);
Console.Write("\tUS Dollar : {0:0.00}\n ",us_dollar);
Console.Write("\tJapanese Yen : {0:0.00}\n ",jpn_yen);
Console.Write("\n\n");
Console.Write("\tEnd of Program");
Console.ReadKey();
}
}
}
Student Grade Calculator in C
Machine Problem
Write a program that will ask the student to give the prelim, midterm, and final grade, and then the program will compute the average grade of the student and display the result on the screen.
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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
You can buy my C++ book online at
https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/
You can buy my book in introduction to computer networking at
https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking
Want to support my channel?
GCash Account
Jake Pomperada
09173084360
Paypal
https://paypal.me/jakerpomperada
Patreon
https://www.patreon.com/jakerpomperada
Thank you very much for your support.
Program Listing
/* grade.c
Author : Jake Rodriguez Pomperada,BSCS,MAED-IT
Date : November 13, 2018 Tuesday 9:44 PM
Location : Bacolod City, Negros Occidental
Tool : Dev C++ Version 5.11
Website : http://www.jakerpomperada.com
Email : jakerpomperada@jakerpomperada.com
*/
#include <stdio.h>
int main()
{
float solve_average=0.00;
float prelim=0.00,midterm=0.00,final=0.00;
system("COLOR F0");
printf("\n\n");
printf("\tStudent Grade Calculator in C");
printf("\n\n");
printf("\tGive Prelim Grade : ");
scanf("%f",&prelim);
printf("\tGive Midterm Grade : ");
scanf("%f",&midterm);
printf("\tGive Final Grade : ");
scanf("%f",&final);
solve_average =(prelim+midterm+final)/3;
printf("\n\n");
printf("\t===== DISPLAY RESULTS =====");
printf("\n\n");
printf("\tThe student average grade is %.0f.",solve_average);
printf("\n\n");
printf("\tEND OF PROGRAM");
printf("\n\n");
}
Monday, October 24, 2022
Last Character Occurrence in C++
A program that will determine the location of the character in a given string in C++ programming language.
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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
You can buy my C++ book online at
https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/
You can buy my book in introduction to computer networking at
https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking
Want to support my channel?
GCash Account
Jake Pomperada
09173084360
Paypal
https://paypal.me/jakerpomperada
Patreon
https://www.patreon.com/jakerpomperada
Thank you very much for your support.
Program Listing
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
char str[]="jake pomperada";
char *p;
p=strrchr(str,'e');
cout <<"\n\n";
cout<<"\tThe last occurence of character e is at "
<<(p-str)+1 <<".";
}
Sunday, October 23, 2022
String Palindrome in JavaScript
A program that I wrote using JavaScript, CSS, and HTML to ask the user to give a string and then the program will check if the given string is a palindrome or not.
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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
You can buy my C++ book online at
https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/
You can buy my book in introduction to computer networking at
https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking
Want to support my channel?
GCash Account
Jake Pomperada
09173084360
Paypal
https://paypal.me/jakerpomperada
Patreon
https://www.patreon.com/jakerpomperada
Thank you very much for your support.
Program Listingindex.htm<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>String Palindrome in JavaScript</title> <style type="text/css"> .style1 { font-family: Arial; font-size: x-large; color: #FFFFFF; } .style3 { font-family: Arial; font-size: large; color: #FFFFFF; } .style4 { font-size: medium; } .style5 { font-family: Arial; } .style6 { font-size: large; } .style7 { margin-bottom: 0px; } .style8 { font-weight: bold; } </style> </head> <body bgcolor="#00FF00"> <hr /> <p class="style1"><strong>String Palindrome in JavaScript</strong></p> <p class="style3"><strong>Created By Jake R. Pomperada, MAED-IT, MIT</strong></p> <hr /> <p class="style3"><strong>Give a String </strong> <span class="style4"><span class="style5"><span class="style6"> <input name="Text1" type="text" style="width: 252px; height: 29px" id= "pa" required/></span></span></span></p> <form method="post" class="style3"> <strong>Result </strong> <span class="style4"><span class="style5"><span class="style6"> <input name="Text2" type="text" style="width: 252px; height: 29px" class="style7" id = "pa2" /></span></span></span></form> <p class="style3"> <strong><span class="style6"> <input name="Button1" type="button" onclick = "palindrome()" value="Check" style="width: 133px; height: 45px" class="style8" /></span></strong> <input name="Button2" type="button" onclick = "ClearFields()" value="Clear" style="width: 133px; height: 45px" class="style8" /></p> <script type = "text/javascript"> // Written By Jake Rodriguez Pomperada, MAED-IT, MIT function palindrome() { var a= document.getElementById("pa").value; var b = ""; for (i = a.length-1; i >= 0; i--) { b = b + a[i] } var empt = document.getElementById("pa").value; if (empt == "") { alert("Please input a string"); document.getElementById("pa").focus(); } else { if (a.toUpperCase() == b.toUpperCase()) document.getElementById("pa2"). value = b.toUpperCase() + " is a Palindrome String "; else document.getElementById("pa2"). value = b.toUpperCase() + " is not a Palindrome String"; } } function ClearFields() { document.getElementById("pa").value =""; document.getElementById("pa2").value =""; document.getElementById("pa").focus(); } </script> </body> </html>
Saturday, October 22, 2022
Odd and Even Number Using Function in Python
Machine Problem
A simple program to ask the user to give a number and then the program will check and determine if the given number is odd or even number using function in Python.
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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
You can buy my C++ book online at
https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/
You can buy my book in introduction to computer networking at
https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking
Want to support my channel?
GCash Account
Jake Pomperada
09173084360
Paypal
https://paypal.me/jakerpomperada
Patreon
https://www.patreon.com/jakerpomperada
Thank you very much for your support.
Program Listing
def Odd_Even(num):
if num%2 == 0:
type_value="even number."
else:
type_value = "odd number"
return type_value
num = int(input('Give a Number: '))
numtype = Odd_Even(num)
print();
print('Given number is',numtype)