/*Program to print square of first and last no of inputted no Created by : Malhar Vora Created on : 8-8-2010 Email : vbmade2000@gmail.com WebSite : http://malhar2010.blogspot.com ******************************************************************************************************/ #includevoid main() { int i=358,a=0,first=0,last=0,flgfirst=0; while(i>0) { a = i%10; if(flgfirst==0) { last=a; flgfirst=1; } first=a; i=i/10; } printf("Square of First no : %d",(first*first)); printf("\nSquare of Second no : %d",(last*last)); }
Sunday, August 8, 2010
C Program to print square of first and last nos of inputted no
Labels:
C
Subscribe to:
Post Comments (Atom)
A program that prints itself:
ReplyDelete-------------------------------
int main(){
char *p="int main(){ char *p=%c%s%c; printf(p,34,p,34); return 0;}";
printf(p,34,p,34);
return 0;
}