SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<math.h>
  3. #include<stdlib.h>
  4.  
  5. int main(){
  6.    
  7.     float  x,y ;
  8.     float  x1, y1  ;
  9.     float  r ;
  10.     printf("enter x1 value ") ;
  11.     scanf("%f", &x1) ;
  12.     printf("enter y1 value ") ;
  13.     scanf("%f", &y1 ) ;
  14.     printf("enter radius value ") ;
  15.     scanf("%f", &r) ;
  16.    
  17.     for(x = -x1; x <= x1; x+= 0.25 ){
  18.     for(y= -y1; y <= y1;  y+= 0.25 ){
  19.     if ( x==0 && y==0)
  20.     printf("*") ;
  21.     if ((x*x)/(r*r)+(y*y)/(r*r)==1)
  22.     printf("*") ;
  23.    
  24.     else
  25.     printf("  ") ;
  26.     }
  27.     printf("\n") ;
  28.     }
  29.    
  30.     system("PAUSE") ;
  31.     return 0 ;
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top