Вычислить значение по формуле: 1+sin2(x+y)/2+mod(x-2x/1+x2y2)+x на С++

13.06.2014 15:33 Администратор
Печать
(7 голоса, среднее 4.57 из 5)

Вычислить значение по формуле (все значения принимают действительные значения):

1+sin2(x+y)/2+mod(x-2x/1+x2y2)+x

#include <stdio.h>
#include <math.h>
#include <conio.h>
#include <iostream.h>
void main ()
{
int c, x, y;
printf ("\nThe Program for calculation on formula:\n1+sin2(x+y)/2+mod(x-2x/1+x2y2)+x.\n");
printf ("\nWill enter the X and press Enter,\n will then Y and press Enter\n");
scanf("%i%i",&x,&y);
c=pow(sin(x+y),2)/2+fmod(x-2*x/1+pow(x,2),pow(y,2))+x;
printf ("\n  =%i",c); 
getch ();
}

******************************************************************

Комментарии:

pow – возведение в степень, fmod – модуль числа


Download SocComments v1.3