Posts

Program To Print Patterns

  Written by Yogesh  If any Error in Code pls Comment   Square Print      * * * * *    * * * * *    * * * * *    * * * * * Algorithm Step1 : Start Step2: outer for loop               i=1  i<5  i++                  printf("* "); Step3 : inner for loop                j=1  j<5  j++ Step4 : Stop Code // Crazy-Coader #include <stdio.h> #include <conio.h> int main () {     int n = 5 ;     printf ( "enter the number  : \n " );     scanf ( " %d " , & n );     for ( int i = 1 ; i <= n ; i ++)    {       for ( int j = 1 ; j <= n ; j ++)       {           printf ( "*" );       }       printf ( " \n " );   ...

Program To Calculate Quadratic Equation

Image
  Quadratic Equation        Algorithm Step1 : Start Step2 : Read a, b, c values Step3 :Compute d = b2 4ac            if d > 0 then           r1 = b+ sqrt (d)/(2*a)            r2 = b sqrt(d)/(2*a)       Otherwise if                 d = 0 then               compute r1 = -b/2a, r2=-b/2a                 print r1,r2 values           Otherwise if                    d < 0 then print roots are imaginary Step4 : Stop    Flow Chart      Code # include # include int main (){ float a,b,c,r1,r2,D; printf ("enter the values of a b c :\n"); scanf (" %f %f %f", &a, &b, &c); D= b*b-4*a*c; if (D>0){...