I have the following code that writes out multiple files. I want this code to also write out an empty line at the end of each file produced, I've tried adding ('\n\') inside the loop however it adds an empty line to every line which is annoying
i = 0
f = open('innput.txt','r')
always_print =...
Hello
i am trying to make code which will request user for his phone number (on one line), that number will be stored in array number, everything works ok till i dont type less then 10 numbers and press enter, cycle is waiting for next number/s on new line but i want program to give message...
Hi, I'm trying to write a code with for-loop to get numbers in order. For example 3,4,5,6 or -1,0,1,2,3. This is what I have come up with this far.
public static void runLoop(int start, int end){
for (start <= end; start++){
System.out.print(start);
}
}
For example, normally for loops do text like this:
for num in 1 2 3 4 5; do
echo "$num"
done
1
2
3
4
5
But what would you need to generate this outcome:
1 2 3 4 5