please dont rip this site

Language Ccpp Cref Examples Modulo.c

  
/************************************************************************
 *
 * Purpose: Program to demonstrate the '%' operator.
 * Author:  M J Leslie
 * Date:    19-Mar-94
 *
 ************************************************************************/

#include <stdio.h>

main()
{
  int i,j;
				/* The modulo is the remainder of 
				   after an integer division	*/

  printf("14 modulo 7 (14%%7) is %i\n", 14%7);		/* answer is 0 	*/
  printf("15 modulo 7 (15%%7) is %i\n", 15%7);		/* answer is 1 	*/

  i=10; j=6;
  
  printf("%i modulo %i (%i%%%i) is %i\n",i,j,i,j,i%j);	/* answer is 4 	*/
}


file: /Techref/language/ccpp/cref/EXAMPLES/modulo.c, 0KB, , updated: 1997/4/21 08:52, local time: 2024/12/12 09:10,
TOP NEW HELP FIND: 
18.97.14.84:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.piclist.com/techref/language/ccpp/cref/EXAMPLES/modulo.c"> language ccpp cref EXAMPLES modulo</A>

Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .