FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Sum of numbers, Factorial, and LCM
NewsProgramming Languages

Sum of numbers, Factorial, and LCM

via Dev.to PythonSasireka3h ago

1)Sum of first n numbers Flowchart Python sum = 0 no = 1 while no <= 10 : sum = sum + no no = no + 1 print ( " Sum = " , sum ) Output Javascript let sum = 0 ; let no = 1 ; while ( no <= 10 ) { sum = sum + no ; no = no + 1 ; } console . log ( " Sum = " , sum ); Java public class SumOfNumbers { public static void main ( String [] args ) { int sum = 0 ; int no = 1 ; while ( no <= 10 ) { sum = sum + no ; no = no + 1 ; } System . out . println ( "Sum = " + sum ); } } 2)Factorial of a number Flowchart Python fact = 1 no = 1 while no <= 5 : fact = fact * no no = no + 1 print ( " Factorial = " , fact ) Output Javascript let fact = 1 ; let no = 1 ; while ( no <= 5 ) { fact = fact * no ; no = no + 1 ; } console . log ( " Factorial = " , fact ); Java public class FactorialExample { public static void main ( String [] args ) { int fact = 1 ; int no = 1 ; while ( no <= 10 ) { fact = fact * no ; no = no + 1 ; } System . out . println ( "Factorial = " + fact ); } } 3)Least Common Multiple(LCM) Flowch

Continue reading on Dev.to Python

Opens in a new tab

Read Full Article
0 views

Related Articles

Rivian gets another $1B from Volkswagen
News

Rivian gets another $1B from Volkswagen

TechCrunch • 25m ago

Firefox & Gtk Emoji picker
News

Firefox & Gtk Emoji picker

Lobsters • 42m ago

News

Uses for nested promises

Lobsters • 48m ago

Yes, you need a smart bird feeder in your life - and this one's on sale
News

Yes, you need a smart bird feeder in your life - and this one's on sale

ZDNet • 1h ago

Apple pulls the plug on its high-priced, oft-neglected Mac Pro desktop
News

Apple pulls the plug on its high-priced, oft-neglected Mac Pro desktop

Ars Technica • 1h ago

Discover More Articles