int fatorial(int n, int f){
int resultado;
while(n>1){
f=1;
resultado=(n*f);
f=f-1;
}
return (resultado);
}
int main(void){
int resultado;
int n;
int f;
printf("Digite o numero a ser fatorado:\n");
scanf("%d", &n);
resultado=fatorial(n,f)...
Would you like to make a loop in this case?
PaperBLL paperBLL = new PaperBLL();
List<PaperEO> papers = paperBLL.SelectPapers();
HyperLink1.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 1)....
algoritmo "numeros_perfeitos"
var
c, n:inteiro
nv, np, npv:real
inicio
para n <- 1 ate 100 faca
para c <- 1 ate n faca
se n % c = 0 entao
nv <- n / c
se nv < n entao
np <- nv + np
fimse...
I have the following situation:
- I have a variable called (distrow_vector). This variable receives a 2D list with multiple vectors.
- I want it to be displayed, only vectors whose sum of their indexes are less than 100.
- I have the code below,...
In this example:
. Ask for today's date via a form.
. Check if it was typed in dd / mm / yyyy format.
. Compare with the current system date
from datetime import date
def verificacaoData():
dataForm = input('Digite a data atual no pad...
Continuing the marathon of articles regarding extraction of texts, I noticed that this type of question is very difficult to find next to a clear and direct answer.
In order to take away my doubt and certainly the one of other users, today's...
I have a StringList inside a mensagens.txt file, I would like to count how many rows have this StringList contained within that file. For each line of the string 1 code will be run in plugin code.
If StringList...
Stack Overflow . Stack Overflow
I have a function to list all tickets for the user who is logged in:
public function list_ticket() {
try {
$session = $_SESSION[SESSION_PREFIX . 'email_username'];
$sql =...
I need to concatenate with jQuery all input values that have classes that start with "item_".
I'm using the function below but it did not work.
$(document).ready(function() {
$('button.vai').click(function(){
var item = $("input[cla...