Hello! (Wave)
Let a binary adder carry-skip of $32$ bits, at which the size of the individual adders is not necessarily the same. Suppose that the individual adders are adders spreading carry, and that the skip is not done at the first and at the last individual adder. If we can use 4...
For the reverse case, we begin from the end and we pick consecutively $n$-digits at the $q$-system that correspond to one digit of the $p$-system. At the beginning, we might need to add 0s to get $n$ digits. Right? How could this rule be proved? (Thinking)
Is it maybe meant that each digit of the number is expressed with $n$ digits of the system $q$ ?
For example in this case $3$ is written as $03$, $2$ as $02$ and $1$ to $01=1$.
So since $p=q^n$ it means that each digit in the $p$-system corresponds to $n$ digits of the $q$-system.
But is this...
Do we know that $p_0,p_1,p_2, \dots$ are also written in the system with basis $q$, since $p=q^n$ and so $p<q$ ?
We have that $\frac{10203}{100}=102 \cdot 100+3$ and so $10203=1023$ with respect to $100$ and $\frac{10203}{10}=1020 \cdot 10+3$ and so $10203=10203$ with respect to $10$, right...
Yes, it is... (Nod) But how do we know that the coefficients $p_0,p_1, \dots$ are also based on the system of basis $q$ ? (Thinking)
Yes, but we need to show that $n$ digits suffice, right? 🧐
Hello! (Wave)
We consider the usual representation of non-negative integers, where the digits correspond to consecutive powers of the basis in a decreasing order.
Show that at such a representation, for the conversion of a number with basis $p$ to a system with basis $q$, where $p=q^n$ and $n$...
Hello! (Wave)
I am looking at the following exercise:
Find the solution $u(t,x)$ of the problem
$$u_t-u_{xx}=2 \sin{x} \cos{x}+ 3\left( 1-\frac{x}{\pi}\right)t^2, t>0, x \in (0,\pi) \\ u(0,x)=3 \sin{x}, x \in (0,\pi) \\ u(t,0)=t^3, u(t, \pi)=0, t>0$$
At the suggested solution, it is stated...
I found online that we could use:
scanf("%c",&temp);
scanf("%[^\n]", ptr->surname);
instead of the scanf I used above and this works! Could you explain to me why we need this temporary variable 'temp' and what '%[^\n]' means? 🧐 🧐
Do we have to use fgets instead of scanf? I tried: "fgets(ptr->surname, sizeof(ptr->surname), stdin);" but it doesn't work...
Or isn't it possible to check for empty spaces at an input? 🧐
To check if the given surname doesn't contain the empty space do we check that with the command "strchr(ptr->surname,' ') != NULL" ? I tried this but although I gave as input a word with space it didn't recognized it. 🧐
For this I changed the function like this:
void GetInformation(struct...
Hello! (Wave)
I have a code in C where the user has to give information (id, name, surname, grade) of a student.
The id must be 5 characters, the name and the surname at most 50 characters.
The code is:
#include <stdio.h>
#include <stdlib.h>
struct student
{
char id[5];
char...
Hello! (Wave)
I have a question... 🧐
https://dyclassroom.com/c/c-passing-structure-pointer-to-function
At the Complete code stated at the site above, at this part:
for (i = 0; i < 3; i++) {
printf("Enter detail of student #%d\n", (i + 1));
printf("Enter ID: ");
scanf("%s"...
Hello! (Wave)
I am looking at the Riemann integral and I have two questions.
Theorem: Let $f: [a,b] \to \mathbb{R}$ bounded and $c \in (a,b)$. Then $f$ is integrable in $[a,b]$ iff it is integrable in $[a,c]$ and in $[c,b]$. In this case we have $\int_a^b f=\int_a^c f + \int_c^b f$.
At the...