![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||||||||||||||
|
Image sizes: 256x256, 48x48, 32x32, 24x24, 20x20, 16x16 File formats: BMP, GIF, PNG, ICO ![]() ![]() ![]() ![]() Tags: x desktop icons, smiley icon downloads, brothers icon collage, icons in taskbar, lizz mohin iconsBut solution offered here, in my opinion, easier.Program Str5; Var S: String; I, X, A, C: Integer; Begin Writeln (' Enter a natural number '); Readln (S); the Number is entered into a string variable |A: = 0; For I: = 1 To Length (S) Do Begin Val (S I, X, C); the Digital character turns to number A: = A+X Digits are summarised End; Writeln (' the Sum of digits is equal ', A) End. Now we will consider some more operations over strings: DELETE operator (S, I, C) deletes from string variable S C characters, Since I; INSERT operator (SN, S, I) inserts substring SN into string variable S Before the character with number I; Function COPY (S, I, C) returns a substring of string S from C characters, since The character with number I; Function Pos (SN, S) returns character number, with which in string S Substring SN (a position of the first occurrence of a substring in string) starts. If such substring is not present, the zero comes back. ![]()
| Copyright © 2006-2022 Aha-Soft. All rights reserved. |
|