Skip to content

Instantly share code, notes, and snippets.

@hiun
Created January 20, 2014 02:21
Show Gist options
  • Save hiun/8513900 to your computer and use it in GitHub Desktop.
Save hiun/8513900 to your computer and use it in GitHub Desktop.
// while.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
/*
while(a<10) {
printf("d% test", a++);
}
*/
/*
int number, i, v1, v2;
for( ; ;) {
scanf("%d", &number);
if(number == 0) {
break;
}
for(i = 1; i<10; i++) {
printf("%d X %d = %d \n", number, i, number * i);
}
}
*/
int number, i, v1, v2;
for( ; ;) {
scanf("%d", &number);
for(i = 1; i<10; i++) {
printf("%d X %d = %d \n", number, i, number * i);
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment