/*WAP to Calculation of simple interest */
#include<stdio.h> #include<conio.h> main( ) { int p, n ; float r, si ; p = 1000 ; n = 3 ; r = 4.5 ; /* formula for simple interest */ si = p * n * r / 100 ; printf ( "%f" , si ) ; }
there is some good c ,java, sql and vb6 programs,Windows tricks, sms shorthand etc
#include<stdio.h> #include<conio.h> main( ) { int p, n ; float r, si ; p = 1000 ; n = 3 ; r = 4.5 ; /* formula for simple interest */ si = p * n * r / 100 ; printf ( "%f" , si ) ; }
equ1- Study=Don't Fail equ2- Don't Study=Fail Ans: Study+Don't Study = Fail+Don't Fail =>Study(1+Don't)=Fail(1+Don't) =>Study=Fail
#include<stdio.h> #include<conio.h> void main() { clrscr(); int a,b,x,y,i[5],j,r; printf("Enter no."); scanf("%d",&a); x=a%2; y=a/2; b=(y*2)+(x); for(j=0;b!=0;b/=2) { i[j]=b%2; j++; } for(r=j-1;r>=0;r--) { printf("%d",i[r]); } getch(); }