Sunday, September 11, 2022

Square and Cube a Number Using ng-model in AngularJS

 Machine Problem

Write a program that uses ng-model directive that will accept a number and then the program will convert the given number by the user into its square, and cube equivalent, and display the results 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 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

<!-- index.htm

  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

  Date     : July 27, 2021  Tuesday   9:12 PM

  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

  Email    : jakerpomperada@gmail.com

 -->

<html>

<head>

  <title>Square and Cube a Number Using ng-model 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>

<script>

 var app =  angular.module('app', []);


  app.filter('Cube', function() {

    return function(number) {

      return(number*number*number);

    };

  });


      app.filter('Square', function() {

          return function (number) {

              return (number * number);

          };

      });


  </script>



<div ng-app="app" ng-init="Val_number=0">

  <form>

  <table border="0" cellspacing=10>

  <tr>Square and Cube a  Number Using ng-model in AngularJS</tr>

  <tr>

  <td>Enter a Number</td>

  <td><input type="number"  ng-model="Val_Num"

    ng-init="Val_Num=0"></td>

  </tr>

</table>

  </form>

  <p>

    The Square Value of {{Val_Num}} is {{Val_Num | Square}}.<br><br>

    The Cube Value of {{Val_Num}} is {{Val_Num | Cube}}.</p>

</div>

</body>

</html>


Saturday, September 10, 2022

Factorial a Number Using Pointers in C++

Factorial a Number Using Pointers in C++

 A program to ask the user a number and then the program will compute the factorial number using pointers 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 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


#include <iostream>


using namespace std;


int Solve_Factorial(int n,  long int *factorial){

        int i;


       *factorial =1;

       for(i=1;i<=n;i++)

       *factorial=*factorial*i;

       }

       

int main(){

         long int factorial;

         int num_given=0;

        

         cout <<"\n\n";

         cout <<"\tFactorial a Number Using Pointers in C++";

         cout <<"\n\n";

         cout <<"\tGive a Number : ";

         cin >> num_given;

         Solve_Factorial(num_given, &factorial); 

cout <<"\n\n";    

         cout <<"\tFactorial of " << num_given 

<< " is " << factorial << ".";

         cout <<"\n\n";

         cout << "\tEnd of Program";

         cout <<"\n";

        }




Friday, September 9, 2022

Odd and Even Number Using Ternary Operator in C++

Odd and Even Number Using Ternary Operator in C++

 A program to ask the user to give a number and then the program will check if the given number is an odd or even number using ternary operator 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 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

 #include <iostream>

using namespace std;

int main() {

  int num=0;

  cout << "\n";
  cout << "\tOdd and Even Number Using Ternary Operator in C++";
  cout << "\n\n";
  cout << "\tGive a Number : ";
  cin >> num;
  cout << "\n";

  (num % 2 == 0) ? cout <<"\t" << num << " is an even number." :  cout <<"\t" <<  num << " is an odd number.";

  cout << "\n\n";
  cout << "\tEnd of Program";
  cout << "\n";
}

Thursday, September 8, 2022

How To Display A String in C

How To Display a String in C

 A simple program to show how to display a string 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

 #include <stdio.h>

int main(){
 char str[100] = "Programming in C";

 printf("%s",str);
}

If Statement in C

If Statement in C

 A simple program to show how to declare an if statement 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
 
#include <stdio.h>

int main()
{
 int age=15;

 if (age>=18) {
   printf("You are already an adult.");
 }

 if (age <18) {
   printf("You are still a minor.");
 }
}
 

Wednesday, September 7, 2022

Odd and Even Number in C++ Using Pointers

Odd and Even Number in C++ Using Pointers

 A simple program to ask the user to give a number and the problem will check if the given number is an odd or even using pointers 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

#include <iostream>

int main()
{
  int num=0, rem=0;
  int *pnum;
  pnum= &num;

  std::cout <<"\n\n";
  std::cout << "\tOdd and Even Number in C++ Using Pointers";
  std::cout <<"\n\n";
  std::cout << "\tGive a Number : ";
  std::cin>> *pnum;

  rem= *pnum % 2;

  std::cout <<"\n\n";
  
  if(rem==0)
   std::cout<<"\t"<<*pnum << " is an even number.\n";
  else
    std::cout<<"\t"<<*pnum << " is an odd number.\n";

  std::cout <<"\n\n";
  std::cout <<"\tEnd of Progam";
  std::cout <<"\n";
}

Tuesday, September 6, 2022

How To View Your Earnings in YouTube in Adsense

Kilometers To Miles Using ng-model in AngularJS

Kilometers To Miles Using ng-model in AngularJS

 Machine Problem

Write a program that uses ng-model directive that will accept distance in kilometers from the user and then the program will convert the given kilometer distance value into miles distance equivalent, and display the results 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 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

index.htm

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 26, 2021  Monday   3:00 PM
  Place    : Bacolod City, Negros Occidental
  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
  Email    : jakerpomperada@gmail.com
 -->
<html>
<head>
  <title>Kilometers To Miles Using ng-model 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="kilometers=0">
  <form>
  <table border="0" cellspacing=10>
  <tr>Kilometers To Miles Using ng-model in AngularJS</tr>
  <tr>
  <td>Enter Kilometer(s) Value </td>
  <td><input type="number"  ng-model="kilometers" ></td>
  </tr>
</table>
  </form>
  <p>{{kilometers}} Kilometer(s) is equivalent to 
     {{(kilometers * 0.621371192) | number:2}} Mile(s).</p> 
</div>
</body>
</html>

Do You Want To Continue in Java

Do You Want To Continue in Java and Calculator

 A simple calculator with do you want to continue in Java 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


package demo;

import java.util.Scanner;



public class mdas {

public static void main(String[] args) {
    // create Scanner class object to  
      // read inputs
      Scanner scan = new Scanner(System.in);
  // Declare variables
      int num1=0, num2=0;
      char operator='\0';
 
      char choice= '\0';
   do {
      
 
       
      System.out.print("Enter the first Number      :  ");
      num1 = scan.nextInt();
      System.out.print("Enter the the Second number :  ");
            num2 = scan.nextInt();

      // read operator
      System.out.println("Available Operators"
+ "are::  (+ - * /)");
      System.out.print("Choose Oerator : ");
      operator = scan.next().charAt(0);

     
     if  (operator == '+') {

        System.out.println("The sum of  "+ num1 + " and " + num2 + " is " + (num1+num2)+".");
     } else if (operator == '-'){

   System.out.println("The difference between  "+ num1 + " and " + num2 + " is " + + (num1-num2)+".");
     }

     else if (operator == '*') {
    System.out.println("The product between  "+ num1 + " and " + num2 + " is " + + (num1*num2)+".");
     }

     else if (operator == '/') {
    System.out.println("The quotient betwenn  "+ num1 + " and " + num2 + " is " + + (num1/num2)+".");
}

else {
    System.out.println("Invalid operator");
      } // end of switch-case
   
     System.out.print("Do you want to perform another calculation? [y-yes/n-no] : ");
    
     choice = scan.next().charAt(0);
     
     if (choice == 'N'|| choice == 'n') {
   
    System.out.print("End of Program");
    break;
     }
     
   } while(choice == 'Y'|| choice == 'y');
         
scan.close();
      
}
    

}



Monday, September 5, 2022

Count Lowercase Characters in Python

Count Lowercase Characters in Python

 A simple program that I wrote using Python asks the user to give a string and then the program will count the number of lowercase characters.

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



print()
print("\tCount Lowercase Characters in Python\n")

string=input("\tGive a string : ")
count=0
for i in string:
if(i.islower()):
count=count+1
print();
print("\tThe number of lowercase characters is:" , count);
print()
print("\tEnd of Program")