fork(1) download
  1. #include<stdio.h>
  2. #include<math.h>
  3. #define pi 3.14159
  4. #define wavelength 70
  5. #define period .1
  6. int main()
  7. {
  8. float graph,s,x;
  9. for(graph=0;graph<pi;graph+=period)
  10. {
  11. s=sin(graph);
  12. for(x=0;x<s*wavelength;x++)
  13. putchar('*');
  14. putchar('n');
  15. }
  16. return(0);
  17. }
Success #stdin #stdout 0s 9416KB
stdin
Standard input is empty
stdout
n*******n**************n*********************n****************************n**********************************n****************************************n**********************************************n***************************************************n*******************************************************n***********************************************************n***************************************************************n******************************************************************n********************************************************************n*********************************************************************n**********************************************************************n**********************************************************************n**********************************************************************n*********************************************************************n*******************************************************************n****************************************************************n*************************************************************n*********************************************************n*****************************************************n************************************************n******************************************n*************************************n******************************n************************n*****************n**********n***n