Results 1 to 4 of 4
Thread: C
Hybrid View
-
21st February 2009 12:18 #1
-
22nd February 2009 03:27 #2Registered User
Join Date: Dec:2007
Location: Sofia
Posts: 366
1. while do-while?
2. ?
, printf/scanf, p?
-
22nd February 2009 11:58 #3
.
Code:#include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { int p, s, n; int w[256]; p=0; s=0; printf("Vuvedi n: \n"); //maksimalnoto za p scanf("%d", &n); printf("Vuvedi p: \n"); scanf("%d", &p); while(p<n) { do { s+=w[p]%10; w[p]=w[p]/10; } while(w[p]/10!=0); w[p]=s; p=p+1; // p++ } return 0; }
-
22nd February 2009 13:10 #4Registered User
Join Date: Dec:2007
Location: Sofia
Posts: 366

while do-while . , s , .




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in