chp4ex4 - printf"Multiples of 6 or 7\n" for(int...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 /* * chp4ex4.c * This program displays multiples of 6 or 7. */ //include default material #include <stdio.h> #include "genlib.h" #include "simpio.h" int main() { int countNumbers = 0 printf("This program displays multiples of 6 or 7.\n") printf("How high should we go? ") int HighestAmountOfMultiples = GetInteger()
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: printf("Multiples of 6 or 7:\n") for(int Multiples=1 Multiples<=HighestAmountOfMultiples if(Multiples%6==0 || Multiples%7==0){ printf("%4.d", Multiples) countNumbers++ if(countNumbers == 6){ printf("\n") countNumbers = 0 } } } } Sheet1 Page 2 Multiples++){...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

chp4ex4 - printf"Multiples of 6 or 7\n" for(int...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online