excrucio
07-12-2008, 18:00
pogledajte ovaj kod!
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[])
{
int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r;
q=20;
m=11;
n=26;
o=8;
p=3;
r=6;
for(a = 1;a<10;a++) {
for(b = 1;b<10;b++) {
for(c = 1;c<10;c++) {
for(d = 1;d<10;d++) {
for(e = 1;e<10;e++) {
for(f = 1;f<10;f++) {
for(g = 1;g<10;g++) {
for(h = 1;h<10;h++) {
for(i = 1;i<10;i++) {
if (q = a + b + c){
if (m = a - d + g){
if (p = b / e + h){
if (r = (c + f) / i){
if (n = d * e + f){
if (o = g - h + i){
cout <<"a="<<a<<", "<<"b="<<b<<", "<<"c="<<c<<", "<<"d="<<d<<", "<<"e="<<sqrt(e)<<", "<<"f="<<f<<", "<<"g="<<g<<", "<<"h="<<h<<", "<<"i="<<i<<endl;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
system("PAUSE");
return EXIT_SUCCESS;
}
hoću da mi izvrši naredbu cout SAMO kada su sve if naredbe istinite, ALI on ju izvrši uvijek.
Molim pomoć!!!
joka.excrucio@yahoo.com
MSN:
joka.excrucio1@hotmail.com
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[])
{
int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r;
q=20;
m=11;
n=26;
o=8;
p=3;
r=6;
for(a = 1;a<10;a++) {
for(b = 1;b<10;b++) {
for(c = 1;c<10;c++) {
for(d = 1;d<10;d++) {
for(e = 1;e<10;e++) {
for(f = 1;f<10;f++) {
for(g = 1;g<10;g++) {
for(h = 1;h<10;h++) {
for(i = 1;i<10;i++) {
if (q = a + b + c){
if (m = a - d + g){
if (p = b / e + h){
if (r = (c + f) / i){
if (n = d * e + f){
if (o = g - h + i){
cout <<"a="<<a<<", "<<"b="<<b<<", "<<"c="<<c<<", "<<"d="<<d<<", "<<"e="<<sqrt(e)<<", "<<"f="<<f<<", "<<"g="<<g<<", "<<"h="<<h<<", "<<"i="<<i<<endl;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
system("PAUSE");
return EXIT_SUCCESS;
}
hoću da mi izvrši naredbu cout SAMO kada su sve if naredbe istinite, ALI on ju izvrši uvijek.
Molim pomoć!!!
joka.excrucio@yahoo.com
MSN:
joka.excrucio1@hotmail.com