Q: Writes a c program to find the sum of all integers between 1 and n?

Write your answer...

Submit

Still have questions?

Continue Learning about Engineering

#include<stdio.h>

#include<iostream.h> #include<conio.h> void main() { for(int i=1;i<=10;i++) { cout<<i*i; } getch(); }

for two positive integers: public static int gcd(int i1, int i2) { // using Euclid's algorithm int a=i1, b=i2, temp; while (b!=0) { temp=b; b=a%temp; a=temp; } return a; }

Both compiler and interpreter are the language programs that translates source program into machine code or we can say object code. Both are used to find errors in source program.

Write a program to find the grade obtained by the students of a class

Related questions

To find the average of integers, add them all together then divide the total by the number of integers.

You won't find any of those, but there are 11 integers.

It is between 4 and 5.

The distance between two integers is the difference.

None

Subtract the smaller from the larger.

For each pair of such integers, find the difference between the absolute values of the two integers and allocate the sign of the bigger number to it.

The question makes no sense.. you can easily find the sum of integers between 1 and 300 but what does 11 or 13 have to do with it.

-- write the difference between the integers without regard to their signs -- give the difference the same sign as the larger of the two integers

8 and 9

9

The difference (greater minus lesser) is the distance between them.