answersLogoWhite

0


Best Answer

Some of ways to solve this problem is to use four nested loops for().
Something like following:
...
const int limit = 1000;
//some code here
for (int i(0); i <= limit; i++)
{
for (int j(0); j <= limit; j++)
{
for (int k(0); k <= limit; k++)
{
for (int l(0); l <= limit; l++)
{
if ((i + j + k) == l)
{
cout << endl << "i + j + k = l and equals to " << l << endl;

}

cout << "ijkl equals to " << (i*j*k*l) << endl;

}

}

}

}
...
//some code here

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How to write a program that for all integers i j k and l from1 to1000 finds and prints all combinations of i j k and l such that i plus j plus k equals l and ijkl?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How did menu's develop?

A restaurant prints it out using a special program


Create a program which accepts a number not less than 10The program prints the reverse of the number?

ten


How do you write a c program that prints a box an oval an arrow and a diamond?

You first learn how to program in C.


Write a program that calculates and prints the sum of the even integers from 2 to 30?

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


How many prints are in 1 gallon?

1 gallon equals 8 pints.


Dry run table in flow-chart?

/* my second program in C++ with more comments */ #include &lt;iostream&gt; using namespace std; int main () { cout &lt;&lt; "Hello World! "; // prints Hello World! cout &lt;&lt; "I'm a C++ program"; // prints I'm a C++ program return 0; }


Program in c to develop an algorithm that prints the n value of algorithm?

reymond rillera reymond rillera


Write a c program that reads ten integers and prints the first and the last numbers on one line and second and ninth on one line and so on....?

#include &lt;cstdio&gt; int main() { int x[10]; printf("Enter 10 integers: \n"); for(int i = 0; i &lt; 10; i++) { scanf("%d", &amp;x[i]); } for(int i = 0; i &lt; 10; i++) { printf("%d, ", x[i]); } char wait; scanf("%s", wait); return 0; }


Why MsgBox with string 000 prints e but 00 or 0000 are printed correctly Thank you ozcansyahoocom?

Your program is wrong.


Do a program with turbo pascal to print the alphabet backward?

Turbo Pascal is a style of computer programming. This type of writing language can be used to create a program that prints the alphabet backwards.


Write a program that read phrase and print the number of lower-case letter in it using function of counting?

write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program


Write a program that input a positive integer and prints a triangle using for loop?

write a program that reads in the size of the side of square and then pints a hollow square of that size out of asterisks and blanks?