Troubles with realisation of the exercise | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Troubles with realisation of the exercise

https://code.sololearn.com/cWIi2L1H1h93/?ref=app The goal is to to del first symbol of every word in the line if S>N and to add few dots at the beggining of the line if N>S.

20th Dec 2017, 10:10 AM
h00man
h00man - avatar
10 Answers
+ 2
G E N I U S: Don't spam! These Chats are for Coding-Questions! DELATE your "Hi" on this Chat. This App is for learn!, not for spam!!!!!!!
24th Feb 2018, 3:30 PM
dieserrapha
dieserrapha - avatar
+ 1
What is n? And what do you mean by deletion of symbols from words? Can you display some input and outputs for clarification?
20th Dec 2017, 12:08 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 1
So, the inpit is "Hello world" N is a random number, which user will type. If N>S it should output "...Hello world" if S>N it should output "ello orld"
20th Dec 2017, 12:20 PM
h00man
h00man - avatar
+ 1
S is the size, right?
20th Dec 2017, 12:22 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 1
And does the number of dots to be appended depend on N or N-S in any case? Or just a constant of 3 dots are to be added and a single char is to be removed?
20th Dec 2017, 12:26 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 1
yh, they are const and only 1 char to rem
20th Dec 2017, 12:27 PM
h00man
h00man - avatar
+ 1
https://code.sololearn.com/c6UtQAAmJ1Mb/?ref=app Sorry for the wait. Here is the code.
20th Dec 2017, 12:58 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 1
@h00man No there isn't any, in C. But there is a function erase in C++ for strings, not character arrays. Let me know if you want a program for that.
20th Dec 2017, 3:00 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
0
yes, its a size of the line
20th Dec 2017, 12:23 PM
h00man
h00man - avatar
0
omg, ty. As I learned, there is no del function, like in pascalabc
20th Dec 2017, 1:30 PM
h00man
h00man - avatar