I am in doubt on this issue:
Write an algorithm that requests the age of several people (USE REPEAT). Enter the total number of people under 25 and the total number of people over 50. The program ends when age is negative (Not to be counted)....
I would like to be doing a PHP contactor in which I might be setting a time for the next number to appear. For example, the number 1 appears and then the number 2 appears replacing the number 1. It would be in the sort of a stopwatch.
Can you...
According to all the sources I consulted, several to be sure, the weighted average is calculated as follows:
Add all values that have the same weight, then multiply that sum by that weight. This is done for all different values and weights. T...
I can not seem to find the error of this code. I made it to check if in a 4x4 array the number being inserted already exists. For some reason that I do not know he accepts repeated values sometimes and sometimes not ...
int main()
{
bool bExit...
I'm trying to return the smallest value using va_args , which supports multiple arguments, but it always returns the same number: -13227;
#include <stdio.h>
#include <limits.h>
#include <stdarg.h>
int minimo(int args,...
I have an exercise for college but I'm lost in my logic and how to solve it.
I have to collect the results of games and set the score for each result.
the winner takes 3 points, a draw guarantees 1 point and the defeat does not get any points....
Algorithm help
A vector with n images A = [1 ... n] has a majority image I if more than half of the vector images are equal I. You can use A [i] = A [j ] to check if the images in the i and j positions are the same. Show how to solve this pr...
Hello, good evening everyone! I have a problem with my number occurrence function in the vector.
The error:
[Error] expected primary-expression before 'F1'
Could anyone help me solve this problem? Thanks in advance!
#include <s...
public class Exercicio2 {
@SuppressWarnings("unused")
public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
int i = 0;
int[] soma = new int[3];
int numero1, numero2 = 0;
int total = 0;...
Last week I was working on this code that prints binary tree graphically but I did not quite understand how to use it or if it has a bug because I type the number of nodes and the algorithm keeps processing and does not print.
#include <stdi...