Posts by Misael • 190 points
12 posts
-
0
votes0
answers185
viewsQ: Create a TAD to represent a data
I have the following task: Create a TAD (struct) to represent a Circumference and then check which of the read circumferences intersect between them. I need to store four basic data, id, x, y and…
-
3
votes2
answers806
viewsA: Mathematical logic betting on the lottery
Based on the answers of @David Dias and @Leo Caracciolo, I come to the simple conclusion that a good solution is to do the following: Make the sum of all amounts wagered, in the form: apostaTotal =…
-
1
votes2
answers806
viewsQ: Mathematical logic betting on the lottery
I can’t think of the mathematical logic of the following issue: Three friends played the lottery. In case they win, the prize must be apportioned in proportion to the amount each gave for the…
-
2
votes1
answer266
viewsQ: Inequality in C language
Data: Brutus is 1.84m and weighs 122kg and Olivia is 1.76m and weighs 45kg. IMC = peso/(altura*altura); IMC: 18,5 a 25 -----> Saudável I want to create an algorithm that prints how much MINIMAL…
-
0
votes1
answer1118
viewsQ: Decimal to binary conversion in C language using ASCII table
I have to make a program that reads some characters and "transform" each character into its corresponding number in the ASCII table and then turn that number into binary and store it in an array. My…
-
1
votes2
answers7160
viewsQ: Decimal to binary conversion in C language
The code below, from the original (http://www.programasprontos.com/algoritmos-conversores/conversao-decimal-para-binario-c/) "prints" a decimal number between 0 and 255 in binary. #include…
-
1
votes1
answer3860
viewsQ: Recursion in C: Sum
I’m learning Recursiveness in C and need to make a recursive function that returns the sum of a number n whichever. The prototype of the function is float somatorio(int n) and the sum to be…
-
1
votes1
answer938
viewsA: How to copy the contents of two files into a third file in c?
So I’m a beginner in programming and I’m learning to code in C. A few days ago I learned about files (in fact I’m still learning). Your code working correctly is this: #include <stdio.h>…
-
0
votes1
answer1139
views -
2
votes1
answer887
viewsQ: Matrix multiplication by matrix transposed in C language
I am new to programming and I am trying to make a program in C language that multiplies a 3x3 matrix by transposing it and prints the result. I’m having a hard time creating a multiplication…
-
0
votes0
answers73
viewsQ: String inversion C language
I have to do a show and almost finished the same. Here’s what you ask for: Palindrome is a phrase or word that keeps the same meaning when read backwards, for example bone, he, grate, etc. Make a…
-
2
votes3
answers378
views