Esempio n. 1
0
int main()
{
  int iloraz, reszta, l1, l2;
  scanf("%d %d", &l1, &l2);
  funkcja(l1, l2, &iloraz, &reszta);
  printf("Iloraz: %d\nReszta: %d\n", iloraz, reszta);
}
Esempio n. 2
0
main () {
  double x;
  printf("\nTABLICOWANIE FUNKCJI:\n");
  printf("\n Argument |   Wartosc   ");
  printf("\n----------+-------------");
  for (x=dol_x; x<=gora_x; x=x+krok_x)
    printf("\n %8.4lf | %10.4lf ", x, funkcja(x));
  printf("\n\n");
}
Esempio n. 3
0
main () {
  float x, dol, gora, krok;
  printf("\nTABLICOWANIE FUNKCJI:\n");
  printf("\n Argument |   Wartosc   ");
  printf("\n----------+-------------");
  for (x=dol_x; x<=gora_x; x=x+krok_x)
    printf("\n %8.4f | %10.4f ", x, funkcja(x));
  printf("\n\n");
}
Esempio n. 4
0
int main(){
	int a,b,q,r;
	printf("Podaj liczbe a i b: a, b \n");
	scanf("%i, %i",&a,&b);
	funkcja(a,b,&q,&r);
	printf("Iloraz: %i, Reszta: %i \n",q,r);
	
	return 0;
}
Esempio n. 5
0
void controller::connectMua(QObject * pView, QObject * pModel) {  // here connect all neccesary items
    //assert ( pView && pModel ) ;

    model* pCurrentModel = qobject_cast<model*>( pModel ) ;

    if (pCurrentModel== NULL){
        pCurrentModel = new model(this);

    }
    connect (  pView, SIGNAL(exitPressedSignal())           , pCurrentModel, SLOT(sl_exitPressed()));
    connect (  pView, SIGNAL(sig_updateTimeDate(QDateTime)) , pCurrentModel, SLOT(sl_updateDateTime(QDateTime)));
    connect ( pModel, SIGNAL(sig_closeApp())                , this ,         SLOT(funkcja()));

}
Esempio n. 6
0
int main(void)
{
	double a, b, c, beta;
	double deltax, epsilon;
	double x, y;
	int lines = 0;

	do
	{
		printf("Wprowadz parametry funkcji A, B, C (po spacji, wieksze od 0): ");
		scanf("%lf%lf%lf", &a, &b, &c);
	}
	while (a <= 0 || b <= 0 || c <= 0);

	printf("Podaj beta: ");
	scanf("%lf", &beta);

	printf("Podaj od jakiego x'a zaczac: ");
	scanf("%lf", &x);

	printf("Podaj krok tablicowania (delta x): ");
	scanf("%lf", &deltax);

	printf("Podaj epsilon: ");
	scanf("%lf", &epsilon);

	while ((y = funkcja(x, a, b, c, beta)) > epsilon)
	{
		printf("%12f\t %12f\n", x, y);
		x += deltax;
		lines++;
		if (lines % 24 == 0)
			system("pause");
	}

	return 0;
}