Skip to main content

All Questions

Tagged with
-1 votes
0 answers
43 views

Print list given by user [closed]

How can we print the same list of the numbers in the output given by the user by using the loop before print the answer in c++? Example: Find the largest number in the list We can get the list of the ...
Muhammad HASNAAT's user avatar
-4 votes
1 answer
41 views

Python help: I have a exe file that takes two arguments and generates an output I would like to run a script that calls the exe file hundreds of times [duplicate]

I have an executable file that works like this: a.exe arg1 arg2 It generates an output: abc. I would like to write a python script that runs a.exe in a loop and stores the output for each execution ...
Angelie's user avatar
0 votes
0 answers
12 views

Nested loops in R: How to append a dataframe column with outputs from an inner loop

I have a timeseries of hourly data spanning 10 years. I would like to calculate the integral (cumtrapz) of a function output that spans each water year (October 1st, year through September 30th, year +...
matazzter's user avatar
1 vote
4 answers
107 views

Print one time in a C function that uses recursion without using a global variable

I have to print One time in a C function that use recursion. The issue is to print End1 at the end of func1 (after recursion call line) 1 time and not more than 1 time: to do this i created fend1() ...
pvt-Tron's user avatar
-2 votes
2 answers
76 views

Function return a value different from that in case (same variable). It follow question "C Multiple Func() printf - With no Reason"

This is a recursive function in C (function call itself) the Main case is: and is returned a value of variable "i" that must be 6 but is 1 as explaned: if(i==6){return i;} but the value ...
pvt-Tron's user avatar
-2 votes
3 answers
121 views

How to print something only once at the end of a recursive function

I have a simple study function: #include<stdio.h> void func1(int i){ if(i == 6) return; // Base Case printf("%d ", i); func1(i + 1); printf("\nEnd1"); } ...
pvt-Tron's user avatar
3 votes
2 answers
131 views

Adding key pair values into a dict missing

I have been trying to add key values of a list into a dict whereas the key is the amount of times X is repeated in the list, and the value is X itself. my_list = ["apple", "cherry",...
Camilo170299's user avatar
-2 votes
3 answers
70 views

Program didnot show printf statement

This code is about creating a value based on the value previously obtained in lectures, so the important variables here are just sks(credits), b, sum, sumsksb, and nh. The program will process it into ...
Maulana's user avatar
0 votes
1 answer
59 views

Why does my Loop not repeat after inputting a correct value from an String Array?

I'm creating a basic word puzzle program as a personal project where a user sees a set of letters and has to create as many words from that set of letters (ie. I T E R; rite, tire, er). A score is ...
Matthew's user avatar
0 votes
1 answer
202 views

Output all the odd and even numbers in the random numbers array

I declare an integer array of size 300, with random values from 1 to 500. I need to output all the even and odd numbers in the array 10 per line. this is my code but I can't print 10 numbers per line ...
QJack's user avatar
  • 17
0 votes
1 answer
24 views

how to convert function output into list, dict or as data frame?

My issue is, i don't know how to use the output of a function properly. The output contains multiple lines (j = column , i = testresult) I want to use the output for some other rules in other ...
ps2341's user avatar
  • 15
0 votes
0 answers
51 views

Avoid number of comparision for the following code program

This was a question asked by my friend Q)) Write the alternative coding using if statement so that it avoids number of comparison for the following code program if(s==1) System .out.println("One&...
Midhun Raj's user avatar
1 vote
0 answers
42 views

My C code is producing unexpected output. Newline "\n" is producing unexpected output in 3 level inner loop

I am using Codelite IDE and when I use 2 nested loops the code works fine but when I use 3 nested loops it produces weird outputs like the '1' in the output image on the right side. #include <stdio....
Ayush Kaithwas's user avatar
-1 votes
1 answer
33 views

Project for my C coding class PETS SPA my question: how to add input from user for phone number

#include <stdio.h> //defined structure struct option { char *string; float price; }; float ask(const char *prompt, size_t n, const struct option options[n]) { for(;;) { ...
Maya Ramos's user avatar
0 votes
0 answers
44 views

Could someone help me with creating a single output after a delay from my code?

I'm using a thermal camera with Python code on my Raspberry Pi. I inserted some code yesterday that'll allow me to find the radius of where a fire is on the thermal camera and I'm going to output the ...
harambeh's user avatar

15 30 50 per page
1
2 3 4 5
17