write a program to display the result of the following summation
-
2020-11-25
- | daafoor
- | مشاهدات: 441
write a program to display the result of the following summation:
1+2+3+4+5+6+7+8+9
=====================================
solution:
int summation=0;
for(int i =1;i<=9;i++)
{
summation=summation+i;
}
System.out.println("result of summation is "+summation);
التعليقات
لا يوجد تعليقات
لاضافة سؤال او تعليق على المشاركة يتوجب عليك تسجيل الدخول
تسجيل الدخول
تسجيل الدخول