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, June 23, 2022
Sum of All Odd Numbers in Java
Machine Problem
Write a program that uses a loop to compute the sum of all odd digits of an input. (For example, if the given number is 6741, the sum would be 7 + 1 = 8.)
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 at 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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
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
test.java
package demo;
//Write a program that uses a loop to compute the sum of all odd digits of an input.
//(For example, if the given number is 6741, the sum would be 7 + 1 = 8.)
import java.util.Scanner;
public class Test
{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int display_result = 0;
System.out.print("\n\n");
System.out.print("\tSum of All Odd Numbers in Java");
System.out.println("\n");
System.out.print("\tGive a Number : ");
int num = input.nextInt();
int y = num;
while (num > 0) {
int digit = num % 10;
if (digit % 2 != 0) {
display_result += digit;
}
num /= 10;
}
System.out.println();
System.out.printf("\tThe Sum of %d odd digits is %d", y, display_result);
System.out.println("\n");
System.out.print("\tEnd of Program");
System.out.println("\n");
input.close();
}
}
Addition of Three Numbers Using TypeScript
A simple program to add the sum of three numbers using TypeScript 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 at 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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
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
addition.ts
Sum and Difference of Two Numbers in TypeScript
A program that I wrote that will compute the sum and product of two numbers using TypeScript 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 at 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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
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
sum_product.ts
Wednesday, June 22, 2022
Automatic Teller Machine Simulation in Scala
Machine Problem
Create and design a program that simulates an Automatic Teller Machine. The money bill to be used in the program will be 1000,500,200 and 100 money bill denomination.
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 at 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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
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
/* atm.scala
Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
www.jakerpomperada.blogspot.com and www.jakerpomperada.com
jakerpomperada@gmail.com
January 8, 2022 7:58 PM Saturday
Bacolod City, Negros Occidental
*/
import java.util.Scanner;
object atm {
def main(args: Array[String]) : Unit = {
var scanner = new Scanner(System.in);
var bill1000=0; var bill500=0; var bill200=0; var bill100=0;
var total_balance=0; var withdraw=0; var money_left=0;
var receive1000=0; var receive500=0; var receive200=0; var receive100=0;
var withdraw_again='n';
do
{
print("\n");
print("\tAutomatic Teller Machine Simulation in Scala");
print("\n\n");
print("\tHow many P1000 bills: ");
bill1000 = scanner.nextInt();
print("\tHow many P500 bills: ");
bill500 = scanner.nextInt();
print("\tHow many PHP 200 bills: ");
bill200 = scanner.nextInt();
print("\tHow many PHP 100 bills: ");
bill100 = scanner.nextInt();
total_balance = (bill1000 * 1000)+(bill500 * 500) + (bill200 * 200) + (bill100 * 100) ;
print("\n\n");
print("\tTotal Balance: PHP " + total_balance);
print("\n\n");
print("\tEnter amount to withdraw: PHP ");
withdraw = scanner.nextInt();
money_left = withdraw ;
if (withdraw > total_balance)
{
print("\tWithdraw amount greater than total balance. ");
print("\n");
}
if (withdraw < total_balance)
{
if (money_left >= 1000 )
{
receive1000 = (money_left / 1000);
if (receive1000 > bill1000 ) receive1000 = bill1000;
money_left = money_left - (receive1000 * 1000);
bill1000 = bill1000 - receive1000;
}
if (money_left >= 500 )
{
receive500 = (money_left / 500);
if (receive500 > bill500 ) receive500 = bill500;
money_left = money_left - (receive500 * 500);
bill500 = bill500 - receive500;
}
if (money_left >= 200 )
{
receive200 = (money_left / 200);
if (receive200 > bill200 ) receive200 = bill200;
money_left = money_left - (receive200 * 200);
bill200 = bill200 - receive200;
}
if (money_left >= 100 )
{
receive100 =(money_left / 100);
if (receive100 > bill100 ) receive100 = bill100;
money_left = money_left - (receive100 * 100);
bill100 = bill100 - receive100;
}
print("\n\n");
print("\tYou will receive:");
print("\n\n");
print("\tPHP 1000 bill :=> " + receive1000);
print("\n");
print("\tPHP 500 bill :=> " + receive500);
print("\n");
print("\tPHP 200 bill :=> " + receive200);
print("\n");
print("\tPHP 100 bill :=> " + receive100);
print("\n\n");
total_balance = total_balance - withdraw;
print("\tYour current balance is: PHP " + total_balance);
print("\n\n");
print("\tYou only have balance of:");
print("\n\n");
print("\tPHP 1000 bill :=> " + bill1000);
print("\n");
print("\tPHP 500 bill :=> " + bill500);
print("\n");
print("\tPHP 200 bill :=> " + bill200);
print("\n");
print("\tPHP 100 bill :=> " + bill100)
print("\n\n");
printf("\tAnother Withdraw Again ? Y/N : ");
withdraw_again = scala.io.StdIn.readChar()
}
} while (withdraw_again.toUpper == 'Y');
print("\n");
print("\tEnd of Program");
print("\n\n");
}
}
Tuesday, June 21, 2022
Simple Login Using JavaScript
A simple login that I wrote using JavaScript programming language.
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 at 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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
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.
Monday, June 20, 2022
Sum of Digits in C
A simple program to ask the user to give a number and then the program will compute the sum of digits 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 at 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.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
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
/* Write a C program to Find Sum of Digits
of a given number */
#include <stdio.h>
int main()
{
int num=0, sum = 0;
printf("\n\n");
printf("\tSum of Digits in C\n");
printf("\n\n");
printf("\tGive a Number : ");
scanf("%d",&num);
printf("\n\n");
printf("\tThe given number %d.\n\n",num);
//loop to find sum of digits
while(num!=0){
sum += num % 10;
num = num / 10;
}
printf("\tThe sum of digits %d.\n",sum);
printf("\n");
printf("\tEnd of Program");
printf("\n");
return 0;
}