Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Accept multiple space separated inputs

<?php
  
// Input 10 20
list($var1, $var2)
        = explode(' ', readline());
  
// Typecasting to integers
$var1 = (int)$var1;
$var2 = (int)$var2;
  
// Printing the sum of var1 and var2.
// The sum of 10 and 20 is 30
echo "The sum of " . $var1 . " and "
    . $var2 . " is " . ($var1 + $var2);
?>
Comment

PREVIOUS NEXT
Code Example
Php :: run multiple php scripts parallel 
Php :: phpdoc array type 
Php :: how to stop message of laravel mix 
Php :: laravel 8 app with more than one database 
Php :: loop IlluminateSupportCollection Object ( [items:protected] = 
Php :: set owner symfony 
Php :: import csv laravel 8 
Php :: character encoding to remove question marks as apostrophe php code 
Php :: simplesaml php logout 
Php :: in packagemanifest.php line 131 undefined index name 
Php :: laravel best practices tutorial 
Php :: laravel gigapay resend invite to employee 
Php :: create a product table 
Php :: he PHP exec() function must be enabled. 
Php :: laravel eloquent where date today 
Php :: laravel-filemanager 404 error 
Php :: where clause with paginate laravel multiple column 
Php :: gerar aquivo csv php 
Php :: php script 
Php :: php code obfuscator 
Php :: php trait 
Php :: wordpress change permalink on upload 
Php :: WP Migrate Lite 
Php :: serialise php 
Php :: print select mysql in php 
Java :: minecraft bedrock location 
Java :: register listener spigot 
Java :: circular imageview android 
Java :: how to get that 1600 sat 
Java :: add retrofit dependency android 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =