How to resolve the algorithm Zero to the zero power step by step in the Ada programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Zero to the zero power step by step in the Ada programming language

Table of Contents

Problem Statement

Some computer programming languages are not exactly consistent   (with other computer programming languages)   when   raising zero to the zeroth power:     00

Show the results of raising   zero   to the   zeroth   power.

If your computer language objects to     0**0     or     0^0     at compile time,   you may also try something like:

Show the result here. And of course use any symbols or notation that is supported in your computer programming language for exponentiation.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Zero to the zero power step by step in the Ada programming language

Source code in the ada programming language

with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Long_Integer_Text_IO,
  Ada.Long_Long_Integer_Text_IO, Ada.Float_Text_IO, Ada.Long_Float_Text_IO,
  Ada.Long_Long_Float_Text_IO;
use  Ada.Text_IO, Ada.Integer_Text_IO, Ada.Long_Integer_Text_IO,
  Ada.Long_Long_Integer_Text_IO, Ada.Float_Text_IO, Ada.Long_Float_Text_IO,
  Ada.Long_Long_Float_Text_IO;

procedure Test5 is

   I    : Integer           := 0;
   LI   : Long_Integer      := 0;
   LLI  : Long_Long_Integer := 0;
   F    : Float             := 0.0;
   LF   : Long_Float        := 0.0;
   LLF  : Long_Long_Float   := 0.0;
   Zero : Natural           := 0;

begin
   Put ("Integer           0^0 = "); 
   Put (I ** Zero, 2);   New_Line;
   Put ("Long Integer      0^0 = ");
   Put (LI ** Zero, 2);  New_Line;
   Put ("Long Long Integer 0^0 = ");
   Put (LLI ** Zero, 2); New_Line;
   Put ("Float           0.0^0 = ");           
   Put (F ** Zero);   New_Line;
   Put ("Long Float      0.0^0 = ");      
   Put (LF ** Zero);  New_Line;
   Put ("Long Long Float 0.0^0 = "); 
   Put (LLF ** Zero); New_Line;
end Test5;


  

You may also check:How to resolve the algorithm Rhonda numbers step by step in the Swift programming language
You may also check:How to resolve the algorithm Delete a file step by step in the Action! programming language
You may also check:How to resolve the algorithm ISBN13 check digit step by step in the Gambas programming language
You may also check:How to resolve the algorithm 99 bottles of beer step by step in the HolyC programming language
You may also check:How to resolve the algorithm Rot-13 step by step in the Julia programming language