Questions tagged as 'algoritmo'

1
answer

Why does not the following code work?

The code should receive a number of student grades, print the grades average, and how many grades are 10% below and 10% above average. The code looks like this: quantidade = int(raw_input()) inicio = 0 ListaDeNotas = list() while quantidade &g...
asked by 10.04.2016 / 16:28
3
answers

Count numbers 1 in binary number after decimal base conversion

In this program I need to count the number of 1's present in the binary number after converting the decimal base. Here is the code: #include<stdio.h> #include<stdlib.h> #include<string.h> int main () { char valor[1000]...
asked by 12.09.2016 / 19:46
1
answer

Method / Algorithm to fetch an ASP.NET MVC data

I'm having the following problem: I'm trying to fetch a date. I just can not figure out an algorithm for this. I have a class named RequisicaoDeVeiculo , this class has the DataEHoraDoServico attribute, and I have another class that...
asked by 04.09.2018 / 01:21
1
answer

How to determine if it is possible to stagger processes using the EDF (Earliest Deadline First) algorithm?

Well, my teacher asked me to do a IN C LANGUAGE algorithm that gets a N value which is the number of processes to evaluate. Next it gets N pairs of values, each pair in a row. Each line will have a C value and another P value, represen...
asked by 02.08.2018 / 04:32
1
answer

Separate listings of one object for each object of the type of another class [closed]

Good Night. My question is regarding the algorithm of my project, I am trying to make an application where each Client can make several requests but each request belongs to a different Client. I still remember that one-to-many logic and aggregat...
asked by 06.04.2017 / 02:54
1
answer

Print a square where the positions of prime number receive a "#" and the others receive "_" [closed]

#include <stdio.h> int main () { int n, i, j; printf("Digite o tamanho do quadrado\n"); scanf("%d", &n); for(i=1; i<=n; i++) { for(j=1; j<=n; j++) { if(i%j == 0) { print...
asked by 02.05.2017 / 02:48
1
answer

Program with 3 files

I made a code in c ++ that works if it's all inside main.cpp. When I create other files, such as a header it gives the undefined reference error. I've done everything and only managed to make it work with a single source file. Can you help me ?...
asked by 28.03.2017 / 22:58
3
answers

Logic to compare four values and find the lowest

Is it correct to compare 4 values in this way? Se (A < B && A < C && A < D){ Escreva A; }; Senao Se (B < A && B < C && B < D){ Escreva B; }; Senao Se (C < A && C < B &a...
asked by 19.11.2017 / 01:12
1
answer

Algorithm to generate a diamond of characters

I'm trying to make a C program to generate a diamond as exemplified in the image below: I have not been able to come up with an algorithm that generates the required characters and spaces on each line. What would be a reasonable way to...
asked by 09.04.2015 / 02:03
1
answer

How do I read to read these numbers and sum all without having to add variable by variable type sum it 60 times

Algoritmo "questionario" Var Resposta: Caractere Var soma,Nota: Inteiro Inicio Escreval("Questionario ENEM 2018 ") Escreval("1) Qual a capital do Brasil?") Escreval("----------------------------") Escreval("a) Brasilia") Escreval("b) Acre") E...
asked by 01.11.2018 / 20:09