#include <stdio.h> int main() { int income=0; while (scanf("%d",&income) > 0) { if (income==0) break; // put your code here; } }