Main Menu

HOME

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

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   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
File exists with PHP and Java(PHP)
List all files in a directory and place them in a select menu(PHP)
radio button redirection(ASP)
checks whether a file exists(VB)
shared resources on your pc(VB)
Check if an image exists(PHP)
Absread in C(C)
Domain name to IP address(PHP)

    




Copyright © 2003 by programmershelp.co.uk