X3eRo0
If no what's the best way to reverse engineering a c++ program
Huy Piseth
Hi
X3eRo0
Hey
X3eRo0
Huy Piseth
are you doing ?
Anonymous
Noob here. Would you suggest learning c++ directly or do c before c++?
Anonymous
Also, how are so many people asking stupid questions every day? maybe they’re bots
Artöm
Dont mix tchar and char
Anonymous
/warn Vishal personal blog promotion
Jhagrut
**#include <stdio.h> #include <stdbool.h> int main() { int p,num,i; bool prime[num+1]; for (int j=2; j<=num; j++) prime[j]=true; scanf("%d", &num); for (p=2; (p*p)<=num; p++) { if (prime[p] = true) { for (i=p*p; i<=num; i += p) prime[i] = false; } } for (p=2; p<=num; p++) if(prime[p]); { printf("%d ", p); } return 0; }**
Jhagrut
You are given an integer N. You need to print the series of all prime numbers till N. Input Format The first and only line of the input contains a single integer N denoting the number till where you need to find the series of prime number. Output Format Print the desired output in single line separated by spaces. Constraints 1<=N<=1000
Jhagrut
Input 9 Your Code's Output 10 Expected Correct Output 2 3 5 7 Compilation Log Compiled successfully.
Jhagrut
what is my mistake
klimi
Some logical error
klimi
I don't know if I want to help ... Looks like some task
Jhagrut
klimi
where sir
Find it
Jhagrut
for the true and false?
Anonymous
klimi
Speaks for itself
Anonymous
/warn JJ PMing without asking
klimi
Easy to fix error lol
Artöm
/warn JJ PMing without asking
This should be in rules imo
Artöm
It is
Oh it is. Have never read rules
Siddhant
Need help in c
Siddhant
How many flags are there in printf?
Siddhant
And which one?
Siddhant
?
Anonymous
Why code not working as expected
klimi
And which one?
What do you expect
Siddhant
What do you expect
Idk the answer
Siddhant
😅
Anonymous
Ok
Stanislav
this code reminded me this https://github.com/AceLewis/my_first_calculator.py/blob/master/my_first_calculator.py
klimi
Idk the answer
First result https://www.tutorialspoint.com/c_standard_library/c_function_printf.htm
Hehehehe
please give c++ program file
Anonymous
Question is to write a programme which takes integer inputs and display each digit of input in english word.. like for 352 output is Three five two
Anonymous
https://pastebin.com/hBsEm5k7
Anonymous
https://pastebin.com/hBsEm5k7
Have written it but why not getting desired output..
Hehehehe
tnks
klimi
Youre welcome
Anonymous
So clean now. Nice!
Anonymous
Anyone to help me with my codes please?
Artöm
Give a link
klimi
Pastebin + description
Anonymous
Pastebin + description
Description of what type?
klimi
Description of what type?
Your problem / issue
Anonymous
Have written it but why not getting desired output..
Yes not getting desired output have written it before
Dima
Anonymous
Can I elaborate my algorithm here?
Anonymous
What I am trying to do?
Anonymous
Possible issue is my understanding level of how c memory works in case of int and float I think
Artöm
You dont need float
Anonymous
Possible issue is my understanding level of how c memory works in case of int and float I think
In the for loop the number gets divided by 10 till it becomes single digit ..And you're printing just that digit.
Anonymous
Yes but that's not happening
Anonymous
352 is being 3.52
Anonymous
Input_float= 3.52
Anonymous
Input is of int data types
Anonymous
Input = input_float
Anonymous
Means input becomes 3 right?
Anonymous
If so in switch output with be three
Anonymous
Input_float= 3.52
Next time it won't enter the for loop then.
Anonymous
Now i am doing( input_float - input)*10