I'm already trying to make a program that does the following: Ask a user to type a number of numbers and then to enter the number of numbers that he wants to have in the combination and then the program prints the combinations and the quantities...
I've been programming for a while and would like you to rate my code in C.
It's an old game using a circular data structure.
My code is here :
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/*
* row...
To better understand how processes work, fork, I wrote this test program:
#include <unistd.h>
#include <stdio.h>
int main(){
int value = 9 ;
int pid = fork();
if(pid==0) value+=2 ;
else value-=5 ;
printf("%d...
What's wrong with this stretch ?? I need to open a file to read and store in a struct, but if I put the condition in while feof! = 0 , when I run it does not work. (this is a function being called in main)
#include <stdio.h>
#include &l...
Create a program that reads six integer values from the keyboard, and then displays values read in the reverse order on the screen.
Inverse order would not be from the smallest to the smallest.
How to do?
#include <stdio.h>
#include <...
How do I use Dev-c ++ with this code.
How to translate it to C?
I started programming recently, I'm kind of wrapped up to understand some things.
Programa CalculoMedia
Var
N1, N2, MEDIA: Real
Início
Leia N1
Leia N2
MEDIA ← (N1+N2)/2...
My code is giving error id returned 1 and I have not the slightest idea why this is giving this error I did everything right, could anyone help me?
#include <stdio.h>
#include <stdlib.h>
int main ()
{
float CP,LP,PP,LA...
Here's my code:
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <unistd.h>
#define tam 20
int main (void){
setlocale(LC_CTYPE, "");
int num[tam];
int troca[tam];
for(int i = 0; i <...
Given a sequence of N numbers between 0 and 100. Determine which is the highest frequency value.
Here's what I've done so far:
#include <stdio.h>
#define max 100
int main()
{
int vetor[max],i,j,frequencia=0,maior=0,tamanho_veto...
I need to solve an exercise where I need to use pointers, vectors and memory storage:
Create a vector with n elements, where each vector position
will match a pointer to a value of type float . Do it
read n values and store them...