/*use "c-free" compiler*/
#include <stdio.h>
main()
{
int a,b,c;
printf("enter the value of a & b");
scanf("%d%d",&a,&b);
c=a+b;
printf("sum of the two numbers is a+b- %d",c);
getch();
}
Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11
This is not a question so you do not need to use a question mark at the end of your sentence.
you can use the condition statement like for(i=0:i<=10;i++)
public static final int getSum(final int n) { int sum = 0; for(int i = 1; i <= n; ++i) { sum += i; } return sum; }
$vi sum.sh echo "enter the 1st no." read num1 echo "enter the 2nd no." read num2 sum= 'expr $num1 + $num2' echo "sum of the numbers is $sum"
Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11
#include #include #include void main(){char a;int firstInt, secondInt, sum;cout > firstInt >> secondInt;sum = firstInt + secondInt;cout
the sum of two consecutive integers is -241, what is the larger integer?
SUM = 0: FOR N = 1 to 100: SUM = SUM + N: Next N: PRINT CHR$(11); "Sum ="; SUM: END
public class sum { public static void main(String args[]){ int sum=0; for(int i=1;i<=10;i++){ sum=sum+i; } System.out.println(sum); } }
This is not a question so you do not need to use a question mark at the end of your sentence.
For N = 2 to 30 STEP 2 Sum = Sum + N Next N Print "The sum is "; Sum; ". Have a nice day. Come back and see us." END
#include <stdio.h> int main(){ int a,b scanf("%d",&a); scanf("%d",&b); a=a+b; printf("%d",a); return 0; } Hope this can help you ☺
Yes, please do.
If you write down all of the integers between the two numbers, your sum is equivalent to 5,659.
A program that calculate the sum of two numbers. #include <stdio.h> int main() { int num1; int num2; int sum; printf("Please enter first integer:\n"); scanf("%d", &num1); printf("Please enter second integer:\n"); scanf("%d", &num2); sum = num1 + num2; printf("The sum of the two integers are %d\n", sum); return 0; } Written by simply. Hope this helps!
you can use the condition statement like for(i=0:i<=10;i++)