Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Find the sum of first 10 natural numbers || Java Programming || Core java

  • Nuzat
  • 2025-05-21
  • 111
Find the sum of first 10 natural numbers || Java Programming || Core java
wajp to find the sum of first 10 natural numberswrite a java program to find the sum of first 10 natural numberswajp to find the sum of first ten natural numberswrite a java program to find the sum of first ten natural numberswajp to print the sum of first 10 natural numberswajp to print the sum of first ten natural numberscore javajava programmingjava programming playlistprogramming playlist in javacore java programming playlistjava programsprograms in java
  • ok logo

Скачать Find the sum of first 10 natural numbers || Java Programming || Core java бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Find the sum of first 10 natural numbers || Java Programming || Core java или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Find the sum of first 10 natural numbers || Java Programming || Core java бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Find the sum of first 10 natural numbers || Java Programming || Core java

In this video I've discussed about how to find the sum of first 10 natural numbers.
We know that natural numbers start from 1
So the initial value of i is 1
We are taking sum as a variable inorder to store the total sum of the first 10 natural numbers.
Q. Till when does the loop execute?
As the condition in the for loop becomes false, the control of the program will exit the loop and next statement is executed.

Q. Why sum is written outside the loop and not inside the loop?
We write the sum variable outside the loop so that the value of sum changing in each iteration does not reset to 0.

Q. Why is the initial value of sum 0 and not 1?
0 has to be the initial value of sum before starting the iteration.
If initially the value of sum is 1 then we would get the output as 56 which is mathematically wrong.

Q. Can't we directly store the total sum as int sum = sum + i?
In java, declaration and using += to update the value in the same line is not allowed. You can use += only after the variable has been initialized.

I hope you have understood the program.
Subscribe to our channel
Thank you and keep watching

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]