Mercurial > hg > GearsTemplate
view src/test/Cudasample_cpu.cu @ 434:b75badf42701
Define Executor to context
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 31 Oct 2017 17:55:50 +0900 |
parents | 2b41bd298fe8 |
children |
line wrap: on
line source
#include <stdio.h> int main(void) { int b; for (b = 99; b >= 0; b--) { switch (b) { case 0: printf("No more bottles of beer on the wall, no more bottles of beer.\n"); printf("Go to the store and buy some more, 99 bottles of beer on the wall.\n"); break; case 1: printf("1 bottle of beer on the wall, 1 bottle of beer.\n"); printf("Take one down and pass it around, no more bottles of beer on the wall\n"); break; default: printf("%d bottles of beer on the wall, %d bottles of beer.\n", b, b); printf("Take one down and pass it around, %d %s of beer on the wall.\n" ,b - 1 ,((b - 1) > 1)? "bottles" : "bottle"); break; } } return 0; }