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

    


Integer division
 

 

Description

This shows integer division using the div function . The div function returns a structure called div_t , this contains the quotient and the remainder .

Code

#include <stdio.h>
#include <stdlib.h>

int main()
{

div_t result;
result = div(77,5);
printf("77 divided by 5 is %d with a remainder of %d.\n", result.quot,result.rem);
return 0;
}

Information

tested using LCC Win 32

 

 

 

 

Download

div.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
check for a valid date(php)
Move a folder(ASP)
display the size of the hard disk using the WMI(C Sharp)
Rainbow text(Javascript)
Associate a file extension with an application(VB)
bubble effect(VB)
Convert from binary to decimal(C Sharp)
Check number of characters(PHP)

    




Copyright © 2003 by programmershelp.co.uk