Wednesday, May 11, 2022

Grams To Kilogram in C#

 A program asks the user to give a value in grams and then the program will convert it into kilograms equivalent 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.

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

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;


namespace ConsoleApplication1

{

    class Program

    {

        static void Main(string[] args)

        {

            /* Kilogram To Grams in C#

             * Jake Rodriguez Pomperada, MAED-IT, MIT

             * www.jakerpomperada.blogspot.com and www.jakerpomperada.com

             * jakerpomperada@gmail.com

             * 

             */

            

            Console.WriteLine("\n");

            Console.Write("\tGrams To Kilogram in C#");

            Console.WriteLine("\n");

          Console.Write("\tGrams To Kilogram in C#");

            decimal gram = Convert.ToDecimal(Console.ReadLine());

            decimal kilogram = gram / 1000;

            Console.WriteLine("\n");

            Console.WriteLine("\t" + gram + " Gram(s) in Kilogram(s) is equal to  " + kilogram + ".");

            Console.WriteLine("\n");

            Console.Write("\tEnd of Program");

            Console.WriteLine("\n");

            Console.ReadKey();

        }

    }

}


Kilogram To Grams in C#

Kilogram To Grams in C#

 A program asks the user to give a value in kilograms and then the program will convert it into grams equivalent 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.

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            /* Kilogram To Grams in C#
             * Jake Rodriguez Pomperada, MAED-IT, MIT
             * www.jakerpomperada.blogspot.com and www.jakerpomperada.com
             * jakerpomperada@gmail.com
             * 
             */
            
            Console.WriteLine("\n");
            Console.Write("\tKilogram To Grams in C#");
            Console.WriteLine("\n");
            Console.Write("\tGive the Kilogram (kg) : ");
            decimal kilogram = Convert.ToDecimal(Console.ReadLine());
            decimal gram = kilogram * 1000;
            Console.WriteLine("\n");
            Console.WriteLine("\t" + kilogram + " Kilogram in Gram(s) is equal to " +gram+".");
            Console.WriteLine("\n");
            Console.Write("\tEnd of Program");
            Console.WriteLine("\n");
            Console.ReadKey();
        }
    }
}


Tuesday, May 10, 2022

String Copy and String Reverse in C++

String Copy and String Reverse in C++

 A simple program to demonstrate string copy and string reverse 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.

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


#include<iostream>
#include<cstring>

using namespace std;

int main()
{
  char str1[50]="I LOVE C++ PROGRAMMING";
  char str2[7];
  
  cout <<"\n\n";
  cout <<"\tString Copy and String Reverse in C++";
  cout <<"\n\n";
  
  strncpy(str2,str1,10);
  
  cout<<"\tstr1:"<<str1<<endl
      <<"\tstr2:"<<str2<<endl;
 
cout <<"\n\n";
cout<<"\tReverse String : " << strrev(str2)<<endl;
 
cout <<"\n\n";
cout <<"\tEnd of Program";
cout <<"\n\n";
}


Sunday, May 8, 2022

Kilograms To Grams in C

Kilograms To Grams in C

 A simple program asks the user to give a value in kilograms and then it will convert into grams equivalent 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.

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

#include <stdio.h>


main()

{

 float kilograms=0.00, grams=0.00;

 

 printf("\n");

 printf("\tKilograms To Grams in C");

 printf("\n\n");

 printf("\tGive Kilogram Value : ");

 scanf("%f",&kilograms);

 

 grams = (kilograms * 1000);

 printf("\n\n");

 printf("\t%5.2f Kilogram(s) is equal to %5.2f Gram(s)."

 ,kilograms,grams);

 printf("\n\n");

 printf("\tEnd of Program");

 printf("\n\n");

}

Friday, May 6, 2022

Difference of Two Numbers Using ng-init in AngularJS

Difference of Two Numbers Using ng-init in AngularJS

 Machine Problem

Write a program that uses the ng-init directive that will compute the difference in the two given numbers, and display the result 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.

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

index.htm

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 28, 2021  Wednesday 2:53 PM
  Place    : Bacolod City, Negros Occidental
  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
  Email    : jakerpomperada@gmail.com
 -->
<html>
<head>
  <title>Difference of Two Numbers Using ng-init in AngularJS</title>
</head>
<style>
body {
  font-family: arial;
  font-size: 25px;
  font-weight: bold;
}
</style>
<script type="text/javascript" src="angular.min.js">
</script><br>
<div ng-app ng-init="val_1=25;val_2=10;">
  <form>
  <table border="0" cellspacing=10>
  <tr>Difference of Two Numbers Using ng-init in AngularJS</tr>
  </tr>
  </table>
  </form>
    <p> The difference between {{val_1}}, and
      {{val_2}} is {{val_1 - val_2}}.</p>
  </div>
</body>
</html>


Simple Login Form Using JavaScript

Simple Login Form Using JavaScript

 A simple login form using JavaScript programming language. I hope you will find my work useful.

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.

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Simple Login Form Using JavaScript</title>

    <style>

        * {

            box-sizing: border-box;

            margin: 0;

            padding: 0;

        }

        body {

            min-height: 100vh;

            display: flex;

            justify-content: center;

            align-items: center;

            background-color: #01C3FF;

            font-family: sans-serif;

        }

        form,

        .message {

            padding: 30px;

            border-radius: 3px;

            background: #fff;

        }

        h2, h4 {

            margin: 5px 0;

            color: #1F1A19;

            text-align: center;

            line-height: 1.2;

        }

        input {

            display: block;

            padding: 8px 3px;

            outline: none;

            font-size: 12px;

            border-top: 0;

            border-right: 0;

            border-left: 0;

            border-bottom: 2px solid #01C3FF;

            border-radius: 0;

            margin-top: 10px;

            width: 100%;

            color: #888;

        }

        input:first-of-type {

            margin-top: 15px;

        }

        .btn {

            padding: 8px ;

            text-align: center;

            display: block;

            width: 100%;

            cursor: pointer;

            border: none;

            background: #01C3FF;

            color: #fff;

            margin-top: 10px;

            border-radius: 3px;

            text-decoration: none;

        }

        button:hover {

            opacity: 0.9;

        }

        .hide {

            display: none;

        }

        #messageDetails {

            margin-bottom: 20px;

            text-align: center;

        }

    </style>

</head>

<body>

    <form action="" id="frmLogin">

        <hr>

        <h2>Simple Login Form<br>Using JavaScript</h2>

        <h4>Jake R. Pomperada, MAED-IT, MIT</h4>

        <hr>


        <input type="text" name="txtUsername" id="txtUsername" placeholder="Enter your username" required>

        <input type="password" name="txtPassword" id="txtPassword" placeholder="Enter your password" required>

        <button type="submit" class="btn">Login</button>

    </form>


    <div class="message hide">

        <p id="messageDetails"></p>

        <a href="" class="btn">Reset</a>

    </div>


    <script>

        document.querySelector('form').onsubmit  = (e) => {

            e.preventDefault()


            let username  = "admin", 

                password  = "admin",

                inputUser = document.querySelector('#txtUsername').value,

                inputPass = document.querySelector('#txtPassword').value


            if (inputUser != username || inputPass != password) {

                document.querySelector('#messageDetails').innerHTML = "Username and Password do not match.<br>Please try again."

            }

            if (inputUser == username && inputPass == password) {

                document.querySelector('#messageDetails').innerHTML = "Success!<br>You're currently logged in now."

            }


            document.querySelector('#frmLogin').classList.add("hide")

            document.querySelector('.message').classList.remove("hide")

        }

    </script>

</body>

</html>

Thursday, May 5, 2022

Kilogram To Grams in C++

Kilogram To Grams in C++

 A simple program asks the user to give a kilogram value and then the program will convert the given kilogram into grams in 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.

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

#include <iostream>
#include <iomanip>


int main() {
float kilograms=0.00;
std::cout <<"\n";
std::cout <<"\tKilogram To Grams in C++";
std::cout <<"\n\n";
std::cout << "\tGive Kilogram Value : ";
std::cin >> kilograms;
float grams = kilograms * 1000;
std::cout <<"\n\n";
std::cout <<"\t" <<kilograms << " Kilogram(s) is equal to "
<<std::fixed<<std::setprecision(2)
<<grams << " Gram(s)";
std::cout <<"\n\n";
std::cout <<"\tEnd of Program";
std::cout <<"\n";
}

Wednesday, May 4, 2022

Current Trends in Machine Learning

Count Consonants and Vowels Using JavaScript

Count Consonants and Vowels in JavaScript

 A program that will ask the user to give a string or a sentence and then the program will count the number of consonants and vowels using JavaScript 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.

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Count Consonants and Vowels Using JavaScript</title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        body {
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #cacaca;
            color: #04181F;
            font-family: sans-serif;
            font-size: 90%;
        }
        main {
            padding: 30px;
            border-radius: 10px;
            background-color: #f1f1f1;
            width: 450px;
        }
        h1 {
            margin-bottom: 5px;
            font-size: 26px;
            text-align: center;
        }
        h2 {
            margin-bottom: 30px;
            font-size: 20px;
            text-align: center;
        }
        .block {
            margin: 0 auto 12px;
            display: flex;
            align-items: center;
        }
        label {
            display: block;
            line-height: 40px;
            background-color: #47356E;
            color: #eee;
            text-align: center;
        }
        textarea {
            padding: 10px;
            width: 100%;
            font-size: 14px;
            border-radius: 0;
            border: 2px solid #04181F;
            outline: none;
            resize: none;
            text-align: center;
            margin: 0;
        }
        button {
            display: inline-block;
            padding: 15px;
            background-color: #F68802;
            color: #eee;
            outline: none; 
            border: none;
            cursor: pointer;
            width: 100%;
            font-size: 16px;
            text-decoration: none;
            text-align: center;
            transition: all .2s;
            margin-top: 5px;
        }
        button:hover {
            opacity: 0.9;
        }
        .output {
            display: block;
            width: 100%;
            margin-top: 12px;
            padding: 20px 0;
            background-color: #2F4C58;
            font-size: 16px;
            text-align:center;
            color: #f3f3f3;
            line-height: 1.5;
        }
        .hide {
            display: none;
        }
    </style>
</head>
<body>
    <main class="container">
        <h1>Count Consonants and Vowels<br>Using JavaScript</h1>
        <h2>Jake R. Pomperada, MAED-IT, MIT</h2>
        <form action="" id="frmCount">
            <label for="grade1">Enter a sentence:</label>
            <textarea name="" id="txtContent" rows="3" required></textarea>
            <button type="submit">Count</button>
            <div class="output hide"></div>
        </form>
    </main>

    <script>
        document.querySelector('#frmCount').onsubmit  = (e) => {
            e.preventDefault()

            let content = document.querySelector('#txtContent').value,
                output = document.querySelector('.output'),
                countConsonants = () => {
                    return content.match(/[^aeiou\s]/gi).length
                },
                countVowels = () => {
                    return content.match(/[aeiou]/gi).length
                }

            output.classList.remove('hide')
            output.innerHTML = 'Number of Vowels: '+countVowels()+'<br>'+
                               'Number of Consonants: '+countConsonants()+'<br>'
        }
    </script>
</body>
</html>