In: Computer Science
ASAP PLEASE
e.g
INPUT
2022745512
OUTPUT
202 274 5512
e.g
INPUT
2
4
6
1
3
OUTPUT
Largest value is: 6
1)
Python code:
#accepting number
number=input()
#printing number seperating area code and prefix
print(number[:3]+" "+number[3:6]+" "+number[6:])
Screenshot:
Input and Output:
2)
Python code:
#accepting first number as largest
largest=int(input())
#loop to accept remaining 4 numbers
for i in range(4):
#accepting next number
num=int(input())
#checking if it is the largest
if(num>largest):
#setting it as largest
largest=num
#printing the Largest value
print("Largest value is:",largest)
Screenshot:
Input and Output: