Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript Site
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


If Else example
 

 

 

Description

This is an example of an if / else statement

Code

/*shows an if else example*/
#include <stdio.h>

main()
{
int result;
/*display message*/
puts("Please enter yor grade.\n");
/*get user input*/
scanf("%d" ,&result);
/*check result and display a message*/
if(result<50)
puts("You failed.\n");
else
puts("You passed.\n");

return 0;

}

Information

tested using LCC Win 32 , Visual C++ 6

 

 

 

 

Download

ifelse1.txt


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
display the time(PHP)
mirror a web page(PHP)
list disk drive information in an excel spreadsheet(VBScript)
Returns the System folder(VB)
scroll to bottom of text box(VB)
checks whether a drive exists(VB)
Check when a process stops running(Powershell)
Change case of a string(Powershell)

    




Copyright © 2003 by programmershelp.co.uk