Budget: 100 UAH Deadline: 1 day
Готовий вже зараз виправити помилку. Додам коментарі з вказівкою на помилку.
Нужно выполнить следующее задание
Работа со строками
Дописати у S2 ті символи з S1, які не зустрічаються у S2
Есть код,но в нём ошибка. Нужно её исправить, использую тот синтаксис,который присутствует в коде
#include <stdio.h>
#include <string.h>
int main(){
char s1[20], s2[20];
int n,p;
int i,j;
gets(s1);
gets(s2);
n=strlen(s1);
p=strlen(s2);
for(i=0;i<n;i++){
bool has = false;
for(j=0;j<p;j++){
if (s1[i]==s2[j])
has = true;
}
if (has=false)
s2 = s2+s1[i];
}
puts(s2);
return 0;
}
Budget: 100 UAH Deadline: 1 day
Готовий вже зараз виправити помилку. Додам коментарі з вказівкою на помилку.
Budget: 100 UAH Deadline: 1 day
Здравствуйте.
Сделаю прямо сейчас. Пишите в лс. Делов на полчаса.
Budget: 100 UAH Deadline: 1 day
Добрый день! Выполню прямо сейчас и отправлю вам! Пишите в личку.
Budget: 200 UAH Deadline: 1 day
здравствуйте, готов сейчас же выполнить ваше задание. Пишите в ЛС или в скайп gayka_mariko
Проще это сделать иначе. Давно конечно с С не работал, но общий алгоритм таков. Есть две строки - отлично. Создаем массив с символами обоих строк. Далее просто удаляем дубликаты и выдаем уже конечный результат.
Я с Си последний раз сталкивался лет эдак 15 назад. Честно не помню есть ли там замечательная функция. Для того-же пхп - это array_unique() Погуглите для Си.
Это удаление определенных символов из строки, а не удаление дубликатов из массива.
Не морочьте вы ему голову функциями из рнр, тут чистый С. Обращайтесь, я подправил ваш пример. Это всё очень криво, но зато сойдёт за "Вашу" работу, а не за чью-то.
может можно и лучше, буду рад если поправите
[code]
#include "stdafx.h"
#include<iostream>
#include<string>
using namespace std;
int main()
{
string s1, s2;
bool isNew = false;
cout << "Enter string s1: ";
getline(cin, s1);
cout << "Enter string s2: ";
getline(cin, s2);
for (int i = 1; i < s1.size(); i++) {
for (int j = 1; j < s2.size(); j++) {
if (s1[i] == s2[j]) {
isNew = false;
break;
}
else {
isNew = true;
}
}
if (isNew) {
s2 += s1[i];
isNew = false;
}
}
cout << "s2 = ";
for (int i = 0; i < s2.size(); i++) {
cout << s2[i];
}
cout << endl;
system("pause");
return 0;
}[/code]
почему вы не пошли на CyberForum? это фриланс биржа, а не форум для программистов, здесь деньги за помощь платят
Максим, в си недопустима такая операция со строками 's2 = s2 +s1[i]'. Вы выделили лишь 20 байт под символы и ни как расширить этот массив не можете. Вы можете изначально выделить 40 байт(максимальная длинна, если в обоих строках ни один символ не повторился), хранить позицию последней записи и записывать по данному индексу не повторяющийся символ, после чего инкрементировать ее.
Исправил твой вариант, но там проблемы со считыванием пока что, если надо - могу скинуть
Create compatibility between the ground control station, automatic start system (SAS), radar, and the aircraft.
Need an MTA:SA developer. I need help assembling a clean MTA:SA 1.6 mtasa-blue source on Windows. What needs to be done: 1. Set up the build environment: Visual Studio, Git, DirectX SDK, CEF, DLL, and other dependencies. 2. Build a clean mtasa-blue client/server. 3. Ensure the client runs without errors. 4. Explain which files/dependencies are needed. 5. Provide a brief guide on how I can rebuild the client myself. 6. Or help further via AnyDesk/Discord/Telegram. Important: - No bypassing anti-cheat. - No cheats. - No malicious code. - Only a legal build of the source and environment setup is needed. The result I want to achieve: - a built clean MTA:SA 1.6 client; - a built server or an explanation of how to build it; - a list of all dependencies; - a brief guide for rebuilding; - an explanation of what exactly was fixed. Or propose your price!
A program needs to be developed for Windows that allows connecting a jailbroken iPhone via USB cable and controlling it from a computer. Main functionality: Connecting the iPhone via USB. The program should quickly recognize the connected iPhone and operate through the cable to minimize delays and lags. Screen mirroring of the iPhone to the computer. (The phone's screen should be displayed on the computer in real-time) Controlling the phone using the mouse. The user should be able to click, swipe, scroll, and control the iPhone screen using the mouse from the computer. Text input from the computer. There should be a shared clipboard between the computer and the iPhone. File transfer from the computer to the iPhone. A function for uploading files from the computer to the phone's memory or to specific folders/apps needs to be added. Stable operation. The program should run smoothly, without significant delays, freezes, or connection drops. Compatibility: support for jailbroken iPhone, rootless jailbreak, iOS 16.7.12, connection via USB.
Individual task KR-1 Deadline - June 20 ---- Figure - a white house with two windows and a colored roof. Drawing - EXCLUSIVELY with pseudographics. Change of window colors: window 1 -- 1=yellow, b=black window 2 -- G==green, r=red output == U Pay attention to the case of characters! Errors - handle == error messages in commands that appear and disappear within 1-2 seconds! ALL OTHER REQUIREMENTS - in the Task Including -- Report on ALL requirements of the Task.