Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 /* atof example: sine calculator */ 00003 #include <stdio.h> 00004 #include <stdlib.h> 00005 #include <math.h> 00006 00007 int main () 00008 { 00009 double n,m; 00010 double pi=3.1415926535; 00011 char szInput [256]; 00012 printf ( "Enter degrees: " ); 00013 gets ( szInput ); 00014 n = atof ( szInput ); 00015 m = sin (n*pi/180); 00016 printf ( "The sine of %f degrees is %f\n" , n, m ); 00017 return 0; 00018 }
Generated on Tue Jul 19 2022 00:09:43 by
1.7.2