All pastes #1355545 Raw Edit

snyper lab4

public c v1 · immutable
#1355545 ·published 2009-03-08 00:27 UTC
rendered paste body
// program start#include "stdafx.h" #include <stdio.h> #include <conio.h> #include <stdlib.h>int highest(); int printmult();int main(){	int int1 = 0;	printf("Press 1 to calculate hightest number\n");	printf("Press 2 to display a multiplication table\n");	printf("Choice: ");	scanf_s("%d", &int1);			switch (int1) {	case 1:		{	highest();		}	break;case 2:printmult();break;	}return 0;}int highest()// (int2 =exit) (int3 = counter of entered values)(int4 = highest number){int int2 = -999; int int3 = 0; int int4 = 0;do {	printf("pick any number\n");	printf("program will display your highest\n");	printf("(type -999 to end selection):");	scanf_s("%d", &int2);	if (int2 > int4){	int3++;	int4 = int3;	}	else if(int2 < int4);	int3++;	else if(int2 == int4);	int3++;	}while (int2 != -999);printf("\n\nThe highest number entered was %d.", int4);int3--;printf ("\nThere are %d numbers.", int3);return 0;}int printmult(){	int int5 = 0; 	int	int6 = 0; 	int	int7 = 0;	printf ("choose a number to display a multiplication table:");	scanf_s("%d", &int6);	printf("\n");	do {	int7 = int5 * int6;	printf("%d", int5);	printf("x%d = ", int6);	printf("%d \n", int7);	}while (int5 != 12);return 0;}