"while"арқылы қалай істейді?
//---------------------------------------------------------------------------
#include #include #include #pragma
hdrstop //---------------------------------------------------------------------------
#pragma argsused int main()
{ int t; float z,y,x,a,b; printf ("\n z nakty san engiz");
scanf ("%f",&z); if (z<1) x=z*z;
else x=z+1; printf ("\n a ");
scanf ("%f",&a); printf ("\n b ");
scanf ("%f",&b); printf ("\n t ");
scanf ("%d",&t); switch(t) { case 1: y=a*log(1+pow(x,1.0/5))+cos(x*x+1)*cos(x*x+1);
break;
case 2: y=a*log(1+pow(x,1.0/5))+cos(2*x+1)*cos(2*x+1);
break;
case 3: y=a*log(1+pow(x,1.0/5))+cos(x/3+1)*cos(x/3+1);
break;
default: printf("\n natizhesi zhok"); } if ((t<=3) && (t>=1)) printf("\ny=%f",y);
getch ();
return 0;
}
//---------------------------------------------------------------------------