Questions tagged as 'printf'

3
answers

Number of digits when using printf

My query is quite simple, but I can not find the answer. I need to specify the number of digits to be printed when I use printf with an integer. Specifically, I always want to print 5 digits, regardless of whether my whole number has an amoun...
asked by 24.11.2016 / 22:31
4
answers

Save data printf in a string - PHP

Hello everyone I have problems saving the data of the printf function in a variable. this is my code: <?php header("Content-type: text/html; charset=utf-8"); $ultima_fecha = "12/08/2018 07:16:26"; $indice1 = explode("/", $ulti...
asked by 20.11.2018 / 23:29
2
answers

Problems with Python - syntax

Why do I get an error when inputting a different value of Numbers? Also, why can not I put the "?" even if they are in quotes?     
asked by 27.10.2017 / 23:54
1
answer

At the moment of showing the final data in C

Since I have a variable with stored data and I try to show it in a printf I do not get the data but a number that has nothing to do with it. totalcasados is variable integer (int). printf("Total de Casados: %d",&totalcasados); should...
asked by 18.09.2017 / 20:42
1
answer

Why do not you show me the stats of the constructor?

package Stats; public class Players { private String name; private int RIT; private int TIR; private int PAS; private int REG; private int DEF; private int FIS; private int MED; public Players (String name, i...
asked by 10.11.2018 / 22:52
0
answers

how could printf be used to display a number of decimals according to a variable

int i = 3 ; //esto puede ser cualquier valor, que va a cambiar segun parametros que yo de double j = 23.65656846516844 // valor cualquiera con decimales System.out.printf( " %.(i)f", j ); What I would like to do there would be to use a% .if be...
asked by 14.06.2018 / 04:23
0
answers

Compiled error: ([Warning] unknown scape sentence "\ 040 [enabled by default])"

I'm trying to solve some c ++ exercises in devc ++ and when I print on the screen with prinft I get an error that says: ([Warning]unknown scape sentence "0 [enabled by default])". It appears in the code: #include<stdio.h>...
asked by 27.05.2017 / 06:41