Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Prob mit Funtion und Bedingung

Empfohlene Antworten

Hallo,

versuche den sin und tan zu berechnen, das mit hilfe einer funktion und wertrückgabe über zeiger...

der haken an der sache ist das ich eben einen bestimmten wertebereich den w annehmen kann ausschließen muß. nur leider bringt er mir einen syntaxfehler `=` in der for-zeile...

das zweite was ich nicht verstehe ist ich habe am anfahnd die math.h includet, doch wenn ich dann M_PI reinschreib sagt er mir das sie nicht initialisiert ist...

Würd mich freuen wenn ihr mir weiter helfen könntet!!!

Danke gruß


#define _CRT_SECURE_NO_WARNINGS

#include <math.h>

#include <stdio.h>

#define PI = 3.14193


void sin_tan(double w, double *ws, double *wt);


int main(void)

{	

	double w, ws, wt;

	printf("Winkel im Bogenmass zw.0 und 3.14 eingeben:\n");

	scanf("%lf",&w);

	sin_tan(w, &ws, &wt);

	printf("Winkel im Bogenmass zw.0 und 3.14\n%f\nSinus= %f\nTangens= %f", w, ws, wt);


	return 0;

}


void sin_tan(double w, double *ws, double *wt)

{


	for ((w <= PI/2 -1e-6) && (w >= PI/2 +1e-6));


	*ws = sin(w);

	*wt = tan(w);


}

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.