Помогите пожалуйста переделать задачу с С++ на язык СИ. Чтобы были библиотеки языка СИ и функции printf, scanf т. д

Дано натуральное число N. Определить, является ли оно степенью числа 3.


#include "iostream"

#include "math.h"

using namespace std;

int main() {

setlocale(LC_ALL, "rus");

int N, k = 1;

cin >> N;

while (k < N) {

k *= 3;

}

if (k == N) {

cout << "Является";

}

else{

cout << "Не является";

}

return 0;

}
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2025 SCHOLAR.TIPS - All rights reserved.