how do we print square of numbers

How do we print square of numbers that is 1,4,9,16,25 and so on using php please reply thank you.

1   0
anees  fatima
profile Jewel Galore 22nd January 2024

Jewelgalore offers a delightful collection of  silver rings for girls . Explore our range of beautifully crafted pieces, perfect for adding a touch of elegance and charm to young girls' fashion

Write a comment ...
Post comment
Cancel
profile Shalamar Hospital 22nd January 2024

Shalamar Hospital, with the  best skin specialist in Lahore , is committed to delivering top-quality dermatological care, prioritizing your skin's health and well-being.

Write a comment ...
Post comment
Cancel
profile OSH 22nd January 2024

Elevate your expertise with Osh University's  postgraduate degree  programs. As a leader in education, Osh offers a transformative learning experience, empowering individuals to excel in their chosen fields.

Write a comment ...
Post comment
Cancel
profile Larry 4th January 2024

Consider using PHPs loop structures to calculate and display the squares of numbers. You can start with a loop that iterates through numbers from 1 squaring each one in the process.
Commercial Cleaning Company in Leander TX

Write a comment ...
Post comment
Cancel
profile 222 Aloha 5th July 2023

For painting tasks with a lengthy lifespan, this is essential. For your particular property and weather conditions, our team would be delighted to offer assistance in choosing the ideal color and paint type. | exterior painting hamilton

Write a comment ...
Post comment
Cancel
profile 16th June 2023

if you want series of numbers which provided by user then here you go. #include<stdio.h> int square(int); int main() { int i=0; int n; printf ("Enter the number:"); scanf ("%d",&n); while(n) { if(i%2==0) { printf("%d ",square(i)); n--; } i++; } } int square(int i) { return i*i ; }

Website: octordle

Write a comment ...
Post comment
Cancel
profile little 4th September 2018

<?php

function findSquare($start,$end){

/* 1. Range will give you all

the numbers in between start and end.

2. The inbuilt function array_map will loop

through each element of that array and do the multiplication

*/

array_map(function($n){

echo ($n*$n).' ';

},range($start,$end));

}

$start = 1;

$end = 10;

findSquare($start,$end);

?>

Ranjeet
17-10-2018 00:00

Thanks, it's working

Write a comment ...
Post comment
Cancel

Please rotate your device

We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site