ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>gET iT i sAY .giis - ext3 File Undelete Tool </title> <META HTTP-EQUIV="Content-Type" CONTENT="text/css; charset=ISO-8859-1"> <META HTTP-EQUIV="EXPIRES" CONTENT="0"> <META NAME="RESOURCE-TYPE" CONTENT="DOCUMENT"> <META NAME="DISTRIBUTION" CONTENT="GLOBAL"> <META NAME="AUTHOR" CONTENT="Lakshmipathi.G"> <META NAME="COPYRIGHT" CONTENT="Copyright (c) by Lakshmipathi.G"> <META NAME="KEYWORDS" CONTENT="C Programs , C Program Examples,C Program Tutorials,logical and && operator"> <META NAME="DESCRIPTION" CONTENT="C program guide with examples"> <META NAME="ROBOTS" CONTENT="INDEX, FOLLOW"> <META NAME="REVISIT-AFTER" CONTENT="1 DAYS"> <META NAME="RATING" CONTENT="GENERAL"> <META NAME="GENERATOR" CONTENT="Gedit"> <link rel="STYLESHEET" href="css/styles.css" TYPE="text/css" /> </head> <body> <TABLE cellspacing=10 cellpadding=10 border=0 width="100%"><TR> <TD valign="top"> <TABLE cellpadding=2 cellspacing=0 border=0 width="100%"> <TR><TD><a href="http://www.giis.co.in" ><IMG src="../images/giis_ext_undelete_tool.png" width="111" height="116" border=0></a></TD></TR> <TR><TD><HR></TD></TR></TABLE> <TABLE cellpadding="2" cellspacing="0" border="0" width="100%" bgcolor="lightGray"> <TR><TD><a href="../index.html">Home</a></TD></TR> <TR><TD><a href="../giis_user_guide.html" >User Guide</a><br></TD></TR> <TR><TD><a href="../giis_mysql_screenshots.html" >DB Recovery</a><br></TD></TR> <TR><TD><a href="../download.html">Download</a></TD></TR> <TR><TD><a href="../manuals.html">Documents </a></TD></TR> <TR><TD><a href="../raq.html" >FAQ</a></TD></TR> <TR><TD><a href="../books.html">Books</a></TD></TR> <TR><TD><a href="../readme.html">About Me</a></TD></TR> <TR><TD><a href="../programs.html">C Programs</a></TD></TR> <TR><TD><a href="../stat.html">Stats</a></TD></TR </TABLE> </TD> <TD valign="top"> <font color="purple"><br> <pre> /* Program# 19 date : 25-12-2008 Single,two,three or four digit number */ #include &lt;stdio.h&gt; main(){ int n; printf("\nEnter a positive number :"); scanf("%d",&n); if(n>=0 && n<=9) printf("Single digit number"); else if(n>=10 && n<=99) printf("\n %d: Two digit number",n); else if(n>=100 && n<=999) printf("\n %d: Three digit number",n); else if(n>=1000 && n<=9999) printf("\n %d: Four digit number",n); else printf("\n %d: Greater than four digits",n); } </pre> <b><font color="purple" size="+2"> output:<br></font></b><font color="purple" size="+2"> Enter a positive number : 123 <br>123: Three digit number</font></td></tr> </tbody></table><br><br> <b><font size="+2">Things to note:</font></b> <b>&nbsp;&nbsp;&nbsp;else if</b> ladder <br> The last else will execute only if all the conditions are false.</b>The below given both the forms of <b>if</b> are equal<pre> <pre> if(condition) if(condition) do this; do this; else else if(condition) { do this; if(condition) do this; } </pre> </pre> <strong><H4 style="color : #006600; text-align : center;">Powered by <br>Open Source Programmers</H4></strong> </TD> </TR> </TABLE> </body> </html>