Computer Science, asked by vishalroy66, 5 months ago

write a program to print N numbers and then print the second largest number​

Answers

Answered by valeriy69
2

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

n = int(input("enter n: "))

nums = [str(n) for n in range(1, n + 1)]

print("\n".join(nums))

print(f"second largest num: {nums[-2]}")

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by Anonymous
1

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

n = int(input("enter n: "))

nums = [str(n) for n in range(1, n + 1)]

print("\n".join(nums))

print(f"second largest num: {nums[-2]}")

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions