CS50x 2023 (harvard.edu)

Codespace cs50

User Manual of C

C standard library cs50

北美计算机四大本科课程设置:

编程语言学

算法与数据结构

操作系统

计算机网络

数据库

分布式系统

Spoiler tag

problem code snippet posted should be posted with spoiler tag

pseudocode?

description text of ideas

<math.h>Functions

Set $m/n = (z/q)^x$, m≥n≥2, z>q≥2, x≥0, all arguments are positive integers.

how to write an arithmetic function to get x value properly in c programming?

could it be like below?

x = $log(m/n)$ / $log(z/q)$ ?

I have tried, what’s wrong in the code? How to prevent it gets infinite or wrong number?

C log() - C Standard Library (programiz.com)

log2 - CS50 Manual Pages

cs50, lab1-population

m=n$(13/12)^x$

m=n*pow(13/12,x)

Data type and Variables

float, double

truncate the decimal

truncation

<stdio.h>