I need the final result to show the whole number and 2 boxes after the comma.
Can you filter, say so, not to show all decimal places?
#include <stdio.h>
#include <math.h>
int main()
{
float r, resp; // declara variavel...
The following source code is the miniaturization of a major problem that I am working on, and I have not been able to solve the problem for two days.
I need to print the values of the vector generated by the "makeVector" function, in the "mai...
To do a college job where I have a separate function that gets two values (WEIGHT and HEIGHT) and returns the BMI.
I also have a struct called ALUNO where weight and height are stored and a vector of 20 positions that will store the structure...
Make an algorithm that reads a set of 30 integer numeric values and distributes them between two vectors, separating the positive numbers from the negative ones. The vectors must have 30 positions each. Show the vectors at the end of processi...
for(pass = 0; pass < size - 1; pass++){
for(j = 0; j < size - 1; j++){
if(array[j] > array[j + 1]){
swap( &array[j], &array[j + 1]);
}
}
}
I just put a piece of code where I have a doubt...
There are some errors in my program when I try to find the odd and even of a float variable.
#include<stdio.h>
#include<string.h>
void exe7(float vet[]){
int i;
for(i=0;i<5;i++){
scanf("%f",&vet[i]);
}...
Help me in the following exercise:
Make a program that defines an array of 5x5 size integers. Then,
initialize this array with random numbers between 5 and 9. Finally, your program must calculate the sum of the diagonal elements of that matri...
I have a text file (txt) that contains the following values:
12 90
These two values I keep and my variables a and b , that is a is equal 12 and b is equal 90 , and I'm using scanf() function to...
I'm trying to declare this buffer on global and when compiling displays the following error
error: initializer element is not constant
char *ls_buffer_PPouAUT = malloc(5120*sizeof(char));
How can I resolve it?
I've been doing a program in C that read string1 and erased the first occurrence of string2.
In string1: "Mouse Roasted Clothes" if I put "Ra" in string2, the program erases correctly, without errors. But if I put "Ro" in string2, it gives error...