Posts

BAHUBALI 2 film story guessing

* Anushka is daughter of kattappa who is a loyal servant to Mahishmathi kingdom * We can see Amarendra bahubali calls kattappa as MAMA in his childhood days scene * Both Raana and Prabhas fell love with her. * But Anushka rejects Raana and feels Prabhas is suitable person for her. * Sivagaami who is very strict in ruling Mahishmati kingdom rejects the Love with a low caste girl and also sends warning to kattappa

A C program to find a sum of series of polynomial

A C program to find the sum of series of polynomial #include<stdio.h> #include<math.h> void main() { int i,n,sum,a[20]; float x; printf(" enter the number of coefficients \n"); scanf("%d",&n); printf("enter the coefficients\n"); for("i=0;i<n;i++) { scanf("%d",&a[i]); } printf("enter the value for x\n"); scanf("%f",&x); sum=0; for(i=n-1;i>0;i--) { sum=sum+a[i]*pow(x,i); } printf("result is %d\n",sum); getch(); clrscr(); }

A Algorithm and Flowchat and Program for Bubble sort

Image
ALGORITHM Step 1: Start Step 2: [input] read n numbers Step 3: [for loop statement] Step 4:  for(i=1;i<n;i++) [loop for passing number] Step 5: for(j=0;j=n-i;j++) [loop for comparison] Step 6: [using if condition]              if(a[j]>a[j+1]) Step 7: [body of if condition]                { Step 8: temp=a[j];              a[j]=a[j+1];              a[j+1]=temp;               }               [end of if condition]               [end of step 5 j loop]               [end of step 4 i loop] Step 9: print the sorted numbers Step 10: Stop [end of the algorithm]

A C program to find square of a number using function

NO PARAMETER AND NO RETURN VALUE #include<stdio.h> void main() { square(); return; } void square() { int a,s; printf("\nenter a number\n"); scanf("%d",&a); s=a*a; printf("\nsquare of a number is= %d",s); return; }

A C program to find all arithmatic operations using function

#include<stdio.h> int sum(int a,int b) { int sum; sum=a+b; return sum; }

A C program to find addition of two array using fundtion

#include<stdio.h> arraysum(int x[10],int z[10]) { int i; for(i=0;i<10;i++) { arraysum=x[i]+z[i]; } return arraysum; }

A C program for Binary search using array

#include<stdio.h> int binarysearch(int a,int m,int n) { int u,mid,h; h=0; u=n-1; { while(1<=u) { mid=(h+u)/2; if(m==a[mid]) { c=1; break; } else if(m<a[mid]) { u=mid-1; } else h=mid+1; } return mid; }