
Вот что накалякал:
Код
#include <iostream.h>
#include <math.h>
void main()
{
int a=2,b=3,c=7,x=4,y;
double h=0.31;
for(x=0;x<=5;x=x+h)
{
if (x<2) y=pow(a,b-x)+c;
if ((x>=2) && (x<=4)) y=pow(b,c-x)+a;
if (x>4) y=pow(c,a-x)+b;
}
cout<<y<<endl;
}
#include <math.h>
void main()
{
int a=2,b=3,c=7,x=4,y;
double h=0.31;
for(x=0;x<=5;x=x+h)
{
if (x<2) y=pow(a,b-x)+c;
if ((x>=2) && (x<=4)) y=pow(b,c-x)+a;
if (x>4) y=pow(c,a-x)+b;
}
cout<<y<<endl;
}
В чем косяк?