Latest topics
» Gambling System -- SUGGESTION
by LOGiC Today at 3:06 am

» [Vote] What do you guys want me to script. [2018-07-16]
by LOGiC Today at 3:02 am

» Welcome our new staff member, =EK=UmaR!
by LOGiC Today at 3:00 am

» Zone Upgrades Suggestion
by LOGiC Today at 2:57 am

» Forum Suggestion -- Forum Rules
by LOGiC Today at 2:56 am

» Rate My SIG
by Pr0_StR!KeR^ Today at 2:49 am

» [Updated] PCJ Drive-by LMS Event -- 5M Cash For Winner!
by 206 Today at 2:12 am

» Selling a Infernus.
by 206 Today at 1:28 am

» I need help #new job
by Roycewicz Yesterday at 11:26 pm

» Admin Application - Blood Sucker
by Blood Sucker Yesterday at 9:02 pm

» [Denied] Admin Application - Sheep
by Rainbow Dash Yesterday at 7:21 pm

» [Update] Back - Immortal
by 206 Yesterday at 4:04 pm

» Unban Request
by 206 Yesterday at 3:44 pm

» Suggestion - propspectate
by Pr0_StR!KeR^ Yesterday at 12:49 pm

» Suggestion - /kill.
by [KM]Helathien Yesterday at 11:40 am

Top posters
ЧК. (7862)
 
Roycewicz (6667)
 
=SdS=KrlozZ... (6183)
 
=KF=Thunder^ (5343)
 
VK.Angel.OfDeath (4470)
 
Vipe[R] (3916)
 
Arnold^ (3707)
 
EK.CrystalBlue (3628)
 
KAKAN (3506)
 
ShadowJacK. (3410)
 

Statistics
We have 1217 registered users
The newest registered user is RazerVan

Our users have posted a total of 160013 messages in 11041 subjects
July 2018 Update - Rel006 switch, next patch? More patch news and about me?

Mon Jul 16, 2018 8:23 am by VK.Angel.OfDeath

Rel006
It feels kinda annoying and boring that we are still in this version. I have done basically everything I can by now or basically have started on everything I can implement. All the other servers by now except those weird letter ones have switched to rel004 or rel006. Kinda feels like we are left behind. I have checked and investigated that most of you play on rel004 and rel006 servers as well, even Hunting who is so against a switch.

I am also kinda tired of some of the bugs like the pickup issue. Hopefully rel006 fixes that issue. A switch will happen at some point I got everything ready. I am kinda waiting for more updates to be released for rel006 and have even reported an issue that I found to the developers.

I kinda feel like it's simply not an option to continue with rel003 anymore. I am of course willing to hear people from the other side, but even though I am person who likes to keep everything as it is for as long as possible, even I know that something can't last …

[ Full reading ]

Comments: 8

June 2018 Update 2 - Patch 4.4 release date announced, video preview, general plans?

Fri Jun 22, 2018 1:04 pm by VK.Angel.OfDeath

Current work
What I have decided to do with the cop job is to make two more final jobs which will put the job into 25 unique jobs in total. However there are multiple choices you can make, so after you complete 25 jobs. You're going to be able to do them again. The rewards will not only be for the usual complete 1-7 levels, it will also have at least 4 more rewards for different endings. I was thinking when you get to around job 50-75, you can probably get something that helps you unlock all endings without having to do the job for like 40 days.

Future jobs
I am definitely proud of most of the jobs I did for the cop job, but I got a feeling not many people will care about reading text messages that simulate conversations. For me it was a fun experience and I definitely don't regret it, but the conversations takes up too much time of the job. So in the future when I create more jobs, I am probably skipping to add conversations and just replace it with text messages telling you what …

[ Full reading ]

Comments: 32

June 2018 Updates - Patch 4.4 release date and the future of the server

Wed May 30, 2018 12:44 pm by VK.Angel.OfDeath



Patch 4.4 and 4.5
I already released a fix for the setproploc command without telling you guys so I think I will just release patch 4.4 around a month after the last patch which would be around 10th of june. From the 5th to 10th I will be hopefully scripting like crazy unless I lose motivation. What will this patch include?

I've spent most of the patch scripting suggestions so far. But I have also started working on the cop job. Which takes a lot of time. Making 50-70 different and fun police missions with NPCs ain't easy. I've only scratched the surface of it and started working on the first 20. I've also made some updates to the NPC system and some other stuff. However most it so far is as I said suggestions. In this patch I hope I can get the cop job finished and the rest of the time I'll use for more suggestions and bug reports. My last exam is friday 1st of june. From the 2nd of june to 10th of june I hope to be scripting to finish the cop job and do some testing. The cop job …

[ Full reading ]

Comments: 18

May Updates - Patch 4.3.1 coming soon, patch 4.4, Patch 5.0

Sun Apr 29, 2018 2:34 pm by Chuck Norris

I know it's not may, but I might as well post this on the last sunday of April.

Patch 4.3.1
I've just finished a really funny script, because I felt like it. Took me a few hours to write everything for that. Hopefully you guys will see, it's the first script I have made that will only be triggered once and it's related to the secret of VKs. Hopefully someone will be able to record it and hopefully you guys won't solve the secret until then Razz, but I think it's gonna take a little more time for you guys to do it.

Apart from that I have a few bug fixes and suggestions that I added. I will most likely have it out next weekend or the weekend after that, depending on how much time I got.

Patch 4.4 & 5.0
I have already started working on patch 5.0, which will be that fight club / minigame creator minigame. So you guys can create custom races, fighting minigames and stuff to do together. You will also be able to save them and then load them. This patch might not come out …

[ Full reading ]

Comments: 8

April 2018 Updates - Patch 4.3 and just talking.

Wed Apr 11, 2018 2:19 pm by VK.Angel.OfDeath

This patch I felt like I actually did a lot of useful things that you guys have been wanting for a while as well as introducing new and cool systems. I have done a little of everything and right now I am just keep pushing. I wanted to make this update like I usually do every month just briefly talking about it. When can we see this patch? I got a week off and have pretty much just been scripting for 3 days because I felt like it and I don't have anything else to do. I have also tested a lot of things together with my normal beta testers. By sunday I will hopefully know when to release the patch. But according to my calculations it hopefully shouldn't be longer than the end of the month in worst case senario, in best case senario it's next sunday maybe, but don't really want to set a deadline.

Advertising the content
The best way to actually start get people to do different things and have more fun is for people to be involved or encouraged by another player. Rainbow actually enjoys …

[ Full reading ]

Comments: 21

March 2018 Updates - What's coming up and discussing the future like usual.

Mon Mar 05, 2018 12:54 pm by VK.Angel.OfDeath

What's going to be added after 4.2:
- Will fix any bugs encountered in 4.2.
- More skins and vehicles have already been prepared to be added will be added this month and the upcoming patch.
- More titles will come out shortly (probably on 4.2.1).
- More trigger Id's and action Id's will be added.
- I will go through a list of suggestions and bugs to fix.
- Character levels or a sunshine auto job will appear, one or the other first. These will be used to unlock rewards.

- Going to work towards my goal of making the property system in a way that let's you basically create minigames (in the future, maybe even in 5.0).


My personal life
I am quite busy at the university for the next two weeks working. After that I will do a few exams, but after that it's pretty chill for me. Hope you guys are good and I hope to meet you at the server at one point when I eventually join lol.






[ Full reading ]

Comments: 15

[Updated: 2018-01-14] January 2018 Updates - Bug fix patch & future stuff

Sun Jan 07, 2018 10:41 pm by Chuck Norris

Bug fix patch
I've already released one bug fix patch for the big serious bugs, there are a few bugs that aren't that serious that people can actually get around (like the few in the treasure hunting event) got an exam tomorrow and the day after that. This weekend I haven't been scripting due to exams, but on wed I will have nothing to do until monday, so I will make up for the lost time.

I looked over my patch 4.1.1 and I made the decision that the patch is not necessary. Any bugs I fixed in it are not game breaking. You guys can still get treasure 9, this patch doesn't have any contents for the players to enjoy so I want to release it along with some content (unless you guys are highly against this). I am planning 4.2 for the end of january/mid february where there will be content.


Future
Keep suggesting stuff and I will keep working on my list, nothing big planned unfortunately, until I get a good idea. I got plenty of custom content, but could always use more so be sure to …

[ Full reading ]

Comments: 27

December News 2017 (again but kinda new) - Just talking about content like usual

Sat Dec 09, 2017 11:13 am by Chuck Norris

Long text this time. Check out 1 and 2 if you want something to reply to and checkout the rest for information

Okay first of: The guy that hacked Andri deleted my previous topic, so I am Writing this one again. It won't be a copy paste and you can see it more as a new update to what I said a few Days ago.

So the missions I am working on? The World is not really on my side and I constantly f*ck up and have to fix bugs. The testing time is a pain in the ass. It might take years Before I complete like 50 missions. So far in like 1 month I am on 2 missions and they are kinda playable. Additionally to that, it's the first two missions so they aren't really that interesting, like missions usually are in games. Once I get my first two missions finished I Think it will go faster scripting the next one. However, It will take time.

Everyone have given me many cool suggestions, but I am desparate for some job suggestions. The thing about delivering pizza vs picking up garbage is that it …

[ Full reading ]

Comments: 14

November Updates - Patch 4.1, more of my usual talks.

Sat Nov 11, 2017 2:37 pm by Chuck Norris

Patch 4.1
I won't give out a date, but I am aiming for november, this patch will include a thing for the NPCs, suggestions and one new job. That I am actually looking forward to scripting. This job is a job I actually want to do and put a lot of effort into it. I have for a very long time, not scripted certain things because I felt like I had to produce content for you guys fast. So in the future I am going to implement cool things that I want to make and at the same time give you guys what you ask for in suggestions.

In 4.2 or later patches I will start giving you guys some more custom content (skins, vehicles and stuff), right now we've had a lot and I want to do my own things and suggestions I receive.

About the state of VC-MP the server
To me VC-MP seems very quiet right now, at a time where I don't really feel as motivated as I used to. I will never stop providing content for this server, but some content that I want to create right now might take a lot of time. Which is why I …

[ Full reading ]

Comments: 22


Programming Topic - Official One

Go down

Programming Topic - Official One

Post by Zeyad_Ahmed on Tue Jan 31, 2017 2:45 pm

Ok hello this topic made for Programmers becuz crys its not good at maths so to be fair we made that topic
Rules
No Spam
No [C# - Squrriel - C++ - PHP] Joking xD
No Stupid Question or Answers Pls
Write the programming language next to the answer
First my Queston
Write a Code to Read HTTP from a site [Write it in C# or VB.net or Jave , no another lang]
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Tue Jan 31, 2017 2:53 pm

C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
My question:
What does this print [Squirrel x32]
Code:
print((2147483647 + 1) + "");

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Zeyad_Ahmed on Tue Jan 31, 2017 2:54 pm

[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Tue Jan 31, 2017 3:02 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Zeyad_Ahmed on Tue Jan 31, 2017 3:04 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Tue Jan 31, 2017 3:06 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Zeyad_Ahmed on Tue Jan 31, 2017 3:27 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation
2147483648 right? :c
btw answer my question is above
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Tue Jan 31, 2017 3:39 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation
2147483648 right? :c
btw answer my question is above
Still wrong
HINT:
This only works with signed 32-bit integers

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Zeyad_Ahmed on Tue Jan 31, 2017 3:41 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation
2147483648 right? :c
btw answer my question is above
Still wrong
HINT:
This only works with signed 32-bit integers
i give up make another question :v
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Tue Jan 31, 2017 3:43 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation
2147483648 right? :c
btw answer my question is above
Still wrong
HINT:
This only works with signed 32-bit integers
i give up make another question :v
Well... let's wait for angle to do that.
In the meantime...
BIG HINT:
Arithmetic overflow

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Chuck Norris on Tue Jan 31, 2017 4:05 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation
2147483648 right? :c
btw answer my question is above
Still wrong
HINT:
This only works with signed 32-bit integers
i give up make another question :v
Well... let's wait for angle to do that.
In the meantime...
BIG HINT:
Arithmetic overflow

My guess would've been overflow, but since you said that in your hint I assume the number is going to be negative when it overflows.
avatar
Chuck Norris
Secret Intelligence Agent of the Community

Posts : 3180
Points : 5491
Reputation : 1405
Join date : 2012-10-14
Location : None

http://vkserver.big-forum.net

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Tue Jan 31, 2017 4:08 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation
2147483648 right? :c
btw answer my question is above
Still wrong
HINT:
This only works with signed 32-bit integers
i give up make another question :v
Well... let's wait for angle to do that.
In the meantime...
BIG HINT:
Arithmetic overflow

My guess would've been overflow, but since you said that in your hint I assume the number is going to be negative when it overflows.
Correct, but you still have to tell us that number Very Happy

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Chuck Norris on Tue Jan 31, 2017 4:14 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation
2147483648 right? :c
btw answer my question is above
Still wrong
HINT:
This only works with signed 32-bit integers
i give up make another question :v
Well... let's wait for angle to do that.
In the meantime...
BIG HINT:
Arithmetic overflow

My guess would've been overflow, but since you said that in your hint I assume the number is going to be negative when it overflows.
Correct, but you still have to tell us that number Very Happy

Let's do some math now shall we. If we got 32 bits it means that the highest value is (2^32) - 1 = 4294967295 for unsigned. But computers are using two complements which means that the most significant bit is negative and equal to -2^31. The highest positive number would then be: 2^31 - 1 (because the we are using one bit for the sign) = 2147483647 (the number you got). When an overflow occurs the bits will change from 0 followed by 31 1's to 1 followed by 31 0's. That means that the number will be - 2^31 = - 2147483648.

I Believe that's correct.
avatar
Chuck Norris
Secret Intelligence Agent of the Community

Posts : 3180
Points : 5491
Reputation : 1405
Join date : 2012-10-14
Location : None

http://vkserver.big-forum.net

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Tue Jan 31, 2017 4:15 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation
2147483648 right? :c
btw answer my question is above
Still wrong
HINT:
This only works with signed 32-bit integers
i give up make another question :v
Well... let's wait for angle to do that.
In the meantime...
BIG HINT:
Arithmetic overflow

My guess would've been overflow, but since you said that in your hint I assume the number is going to be negative when it overflows.
Correct, but you still have to tell us that number Very Happy

Let's do some math now shall we. If we got 32 bits it means that the highest value is (2^32) - 1 = 4294967295 for unsigned. But computers are using two complements which means that the most significant bit is negative and equal to -2^31. The highest positive number would then be: 2^31 - 1 (because the we are using one bit for the sign) = 2147483647 (the number you got). When an overflow occurs the bits will change from 0 followed by 31 1's  to 1 followed by 31 0's. That means that the number will be - 2^31 = - 2147483648.

I Believe that's correct.
Congratulations, correct answer.
Now ask your question...

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Chuck Norris on Tue Jan 31, 2017 4:19 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation
2147483648 right? :c
btw answer my question is above
Still wrong
HINT:
This only works with signed 32-bit integers
i give up make another question :v
Well... let's wait for angle to do that.
In the meantime...
BIG HINT:
Arithmetic overflow

My guess would've been overflow, but since you said that in your hint I assume the number is going to be negative when it overflows.
Correct, but you still have to tell us that number Very Happy

Let's do some math now shall we. If we got 32 bits it means that the highest value is (2^32) - 1 = 4294967295 for unsigned. But computers are using two complements which means that the most significant bit is negative and equal to -2^31. The highest positive number would then be: 2^31 - 1 (because the we are using one bit for the sign) = 2147483647 (the number you got). When an overflow occurs the bits will change from 0 followed by 31 1's  to 1 followed by 31 0's. That means that the number will be - 2^31 = - 2147483648.

I Believe that's correct.
Congratulations, correct answer.
Now ask your question...

What's the difference between 50/5 compared to 50 * 0.2 in terms of performance.
avatar
Chuck Norris
Secret Intelligence Agent of the Community

Posts : 3180
Points : 5491
Reputation : 1405
Join date : 2012-10-14
Location : None

http://vkserver.big-forum.net

Back to top Go down

Re: Programming Topic - Official One

Post by Zeyad_Ahmed on Tue Jan 31, 2017 4:23 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:C#
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://vkserver.big-forum.net/");
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
StreamReader strreader = new StreamReader(new Stream);
return strreader.ReadToEnd();
:v as iam not good at C# but i see it good
let me answer yours
in vb.net
lol it in squrriel :v pls make multilanguage choice :v
No, my question included code, I said that code was in Squirrel. This, btw, could be converted to any x32 language. For example:
Code:
MessageBox.Show((2147483647 + 1).ToString())
VB.Net.
You just need to answer what does that code result in, on console in squirrels case and on a messagebox in that VB.Net conversion I just made above.
21474836471 because you made the value in String
Mine Now

Write a code that make computer shutdown after 4 seconds [in C# or VB.net]
!!!
Wrong answer
Btw, the add was between int32s, not strings, since we converted it to string after the operation
2147483648 right? :c
btw answer my question is above
Still wrong
HINT:
This only works with signed 32-bit integers
i give up make another question :v
Well... let's wait for angle to do that.
In the meantime...
BIG HINT:
Arithmetic overflow

My guess would've been overflow, but since you said that in your hint I assume the number is going to be negative when it overflows.
Correct, but you still have to tell us that number Very Happy

Let's do some math now shall we. If we got 32 bits it means that the highest value is (2^32) - 1 = 4294967295 for unsigned. But computers are using two complements which means that the most significant bit is negative and equal to -2^31. The highest positive number would then be: 2^31 - 1 (because the we are using one bit for the sign) = 2147483647 (the number you got). When an overflow occurs the bits will change from 0 followed by 31 1's  to 1 followed by 31 0's. That means that the number will be - 2^31 = - 2147483648.

I Believe that's correct.
Congratulations, correct answer.
Now ask your question...

What's the difference between 50/5 compared to 50 * 0.2 in terms of performance.
wow that is ultimate quote
:v btw
50/5 = 25 and 50*0.2 = 25
btw is that math topic :v
man that topic is for writing code not for.. ah :v
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by Chuck Norris on Tue Jan 31, 2017 4:25 pm

Lol OMG zeyad the question was about the performance Razz. 50/5 = 10 and 50*0.2 = 10 also lol. Smile
avatar
Chuck Norris
Secret Intelligence Agent of the Community

Posts : 3180
Points : 5491
Reputation : 1405
Join date : 2012-10-14
Location : None

http://vkserver.big-forum.net

Back to top Go down

Re: Programming Topic - Official One

Post by Zeyad_Ahmed on Tue Jan 31, 2017 4:28 pm

[You must be registered and logged in to see this link.] wrote:Lol OMG zeyad the question was about the performance Razz. 50/5 = 10 and 50*0.2 = 10 also lol. Smile
did i wrote 50/0.2 = 25 what a stupid :v
i was think it 0.5 :v
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by =SdS=KrlozZ... on Tue Jan 31, 2017 5:39 pm

Nub programming :p

_______________________________________
[You must be registered and logged in to see this image.]
Credits to: MaSoN^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 6183
Points : 7317
Reputation : 102
Join date : 2016-02-13
Age : 20
Location : Here >:)

Back to top Go down

Re: Programming Topic - Official One

Post by Lahhami^ on Tue Jan 31, 2017 6:11 pm

srry zeyad i came late xD , omg many qsk's here , @Chuck Noris i lub the way you answar crystal qsk . you secretly professional . this too low for you pls xD
Topic Locked as  show's lead to childish fight's .  Very Happy (humor)
avatar
Lahhami^
Server Admin
Server Admin

Posts : 1261
Points : 1663
Reputation : 2
Join date : 2016-08-06
Age : 23
Location : Opssi World!

Back to top Go down

Re: Programming Topic - Official One

Post by KAKAN on Tue Jan 31, 2017 6:34 pm

IIRC, integers can be processed faster than decimals.
So, in terms of performance, 50/5 is faster than 50 * 0.2
But, technically, you won't see much difference.
avatar
KAKAN
Legendary Member
Legendary Member

Posts : 3506
Points : 4006
Reputation : 16
Join date : 2014-09-28
Age : 14
Location : World

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Tue Jan 31, 2017 6:56 pm

[You must be registered and logged in to see this link.] wrote:IIRC, integers can be processed faster than decimals.
So, in terms of performance, 50/5 is faster than 50 * 0.2
But, technically, you won't see much difference.
However, multiplication takes up much fewer operations than divisions.

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Zeyad_Ahmed on Tue Jan 31, 2017 7:07 pm

Write a code for send "Duke" by TCP socket [C# or VB.net]
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Tue Jan 31, 2017 7:13 pm

[You must be registered and logged in to see this link.] wrote:Write a code for send "Duke" by TCP socket [C# or VB.net]
You weren't the one supposed to be asking the question...

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Chuck Norris on Tue Jan 31, 2017 7:51 pm

[You must be registered and logged in to see this link.] wrote:IIRC, integers can be processed faster than decimals.
So, in terms of performance, 50/5 is faster than 50 * 0.2
But, technically, you won't see much difference.

Division takes a lot of Clock cycles to complete KAKAN, I've done hardware programming, It's a pain in the ass. I don't use divisions anymore when I don't have to.
avatar
Chuck Norris
Secret Intelligence Agent of the Community

Posts : 3180
Points : 5491
Reputation : 1405
Join date : 2012-10-14
Location : None

http://vkserver.big-forum.net

Back to top Go down

Re: Programming Topic - Official One

Post by Zeyad_Ahmed on Tue Jan 31, 2017 9:23 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:Write a code for send "Duke" by TCP socket [C# or VB.net]
You weren't the one supposed to be asking the question...
i asked a question becuz no one IS ASKING !!!!
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by KuRuMi^ on Tue Jan 31, 2017 11:39 pm

This is one of the confusing topics I ever seen Surprised Me a nub programmer Razz Zeyad, you owe me training last time :/

_______________________________________
"No matter how big the world is, Tokisaki Kurumi is the only person that can interfere with irreversible time. And also this Zafkiel. Please don’t lend your ears to nonsense made by smart scholars and authors."
I lub you all <3
[You must be registered and logged in to see this image.]

[You must be registered and logged in to see this image.]

If you need any help in situations in the server, contact me on my Facebook "Kurumi Tokisaki VCMP" & I'll do my best to support you at all cost. I recommend you do. [You must be registered and logged in to see this image.]
avatar
KuRuMi^
Full Server Admin
Full Server Admin

Moderator 1
Event staff
Posts : 2865
Points : 3175
Reputation : 5
Join date : 2016-06-25
Age : 19
Location : Walking through time... (Actually is Dallas, Texas)

http://tdz-clan.forumotion.com

Back to top Go down

Re: Programming Topic - Official One

Post by KAKAN on Wed Feb 01, 2017 6:34 am

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:IIRC, integers can be processed faster than decimals.
So, in terms of performance, 50/5 is faster than 50 * 0.2
But, technically, you won't see much difference.

Division takes a lot of Clock cycles to complete KAKAN, I've done hardware programming, It's a pain in the ass. I don't use divisions anymore when I don't have to.
got yo Smile

[You must be registered and logged in to see this link.] wrote:Write a code for send "Duke" by TCP socket [C# or VB.net]
By TCP, what do you mean? MQTT is based on TCP. HTTP is based on TCP, so which one?
Anyways:-
Code:

using System;
using System.IO;
using System.Net;
using System.Text;
using System.Net.Sockets;


public class clnt {

    public static void Main() {
       
        try {
            TcpClient tcpclnt = new TcpClient();
            Console.WriteLine("Connecting.....");
           
            tcpclnt.Connect("172.21.5.99",8001);
            // use the ipaddress as in the server program
           
            Console.WriteLine("Connected");
            Console.Write("Duke sucks!!!!");
           
            String str= "Duke";
            Stream stm = tcpclnt.GetStream();
                       
            ASCIIEncoding asen= new ASCIIEncoding();
            byte[] ba=asen.GetBytes(str);
            Console.WriteLine("Transmitting.....");
           
            stm.Write(ba,0,ba.Length);
           
            tcpclnt.Close();
        }
       
        catch (Exception e) {
            Console.WriteLine("Error..... " + e.StackTrace);
        }
    }

}
Copy pasted code Very Happy
avatar
KAKAN
Legendary Member
Legendary Member

Posts : 3506
Points : 4006
Reputation : 16
Join date : 2014-09-28
Age : 14
Location : World

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Wed Feb 01, 2017 6:36 am

Okay, my question again.
Figure out why this code doesn't work.
[squirrel]
Code:
function1();
function function1()
{
    print("Successful");
}

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by KAKAN on Wed Feb 01, 2017 6:44 am

[You must be registered and logged in to see this link.] wrote:Okay, my question again.
Figure out why this code doesn't work.
[squirrel]
Code:
function1();
function function1()
{
    print("Successful");
}
Squirrel interprets your program rather then compile and execute.
So, it first executes the first line of the code without compiling the whole code, that means, function1 is not yet present in the global table and so doesn't work.
My question: How to "PRINT ALL THE VALUES OF AN ARRAY WITHOUT USING ANY LOOP CONTROL STATEMENTS" Languages allowed: JS or Squirrel or any other dynamic language.
Pretty simple one.
avatar
KAKAN
Legendary Member
Legendary Member

Posts : 3506
Points : 4006
Reputation : 16
Join date : 2014-09-28
Age : 14
Location : World

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Wed Feb 01, 2017 6:48 am

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:Okay, my question again.
Figure out why this code doesn't work.
[squirrel]
Code:
function1();
function function1()
{
    print("Successful");
}
Squirrel interprets your program rather then compile and execute.
So, it first executes the first line of the code without compiling the whole code, that means, function1 is not yet present in the global table and so doesn't work.
My question: How to "PRINT ALL THE VALUES OF AN ARRAY WITHOUT USING ANY LOOP CONTROL STATEMENTS" Languages allowed: JS or Squirrel or any other dynamic language.
Pretty simple one.
Code:
local array = ["KAKAN", "Pitch", "v0t"];
array.apply(function (v) {print(v); return v;});
My question: How do you print a triangle like this:
Code:

@
@@
@@@
@@@@
with a specified height using a foreach loop using squirrel

p.s. the hardest part of these questions is coming up with your own question

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by =SdS=KrlozZ... on Wed Feb 01, 2017 9:12 am

[You must be registered and logged in to see this link.] wrote:Okay, my question again.
Figure out why this code doesn't work.
[squirrel]
Code:
function1();
function function1()
{
    print("Successful");
}


because its not in a script :V

_______________________________________
[You must be registered and logged in to see this image.]
Credits to: MaSoN^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 6183
Points : 7317
Reputation : 102
Join date : 2016-02-13
Age : 20
Location : Here >:)

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Wed Feb 01, 2017 10:00 am

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:Okay, my question again.
Figure out why this code doesn't work.
[squirrel]
Code:
function1();
function function1()
{
    print("Successful");
}


because its not in a script :V
1. This question was already answered.
2. Wrong. It's because at the time of the call to function1(), function1 wasn't declared.

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by =SdS=KrlozZ... on Wed Feb 01, 2017 7:03 pm

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:Okay, my question again.
Figure out why this code doesn't work.
[squirrel]
Code:
function1();
function function1()
{
    print("Successful");
}


because its not in a script :V
1. This question was already answered.
2. Wrong. It's because at the time of the call to function1(), function1 wasn't declared.

XD i though the answer was wrong xd

_______________________________________
[You must be registered and logged in to see this image.]
Credits to: MaSoN^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 6183
Points : 7317
Reputation : 102
Join date : 2016-02-13
Age : 20
Location : Here >:)

Back to top Go down

Re: Programming Topic - Official One

Post by Zeyad_Ahmed on Wed Feb 01, 2017 8:49 pm

Please write question or i will ask a one
Code:
Dim Flake As String
write the value of "flake" when we get the value of physical memory :v?
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by =SdS=KrlozZ... on Thu Feb 02, 2017 2:58 am

[You must be registered and logged in to see this link.] wrote:Please write question or i will ask a one
Code:
Dim Flake As String
write the value of "flake" when we get the value of physical memory :v?

Put a new one :v

_______________________________________
[You must be registered and logged in to see this image.]
Credits to: MaSoN^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 6183
Points : 7317
Reputation : 102
Join date : 2016-02-13
Age : 20
Location : Here >:)

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Thu Feb 02, 2017 4:53 am

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:Okay, my question again.
Figure out why this code doesn't work.
[squirrel]
Code:
function1();
function function1()
{
    print("Successful");
}
Squirrel interprets your program rather then compile and execute.
So, it first executes the first line of the code without compiling the whole code, that means, function1 is not yet present in the global table and so doesn't work.
My question: How to "PRINT ALL THE VALUES OF AN ARRAY WITHOUT USING ANY LOOP CONTROL STATEMENTS" Languages allowed: JS or Squirrel or any other dynamic language.
Pretty simple one.
Code:
local array = ["KAKAN", "Pitch", "v0t"];
array.apply(function (v) {print(v); return v;});
My question: How do you print a triangle like this:
Code:

@
@@
@@@
@@@@
with a specified height using a foreach loop using squirrel

p.s. the hardest part of these questions is coming up with your own question

[You must be registered and logged in to see this link.] wrote:Please write question or i will ask a one
Code:
Dim Flake As String
write the value of "flake" when we get the value of physical memory :v?
v0t?

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by =SdS=KrlozZ... on Thu Feb 02, 2017 4:55 am

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:Okay, my question again.
Figure out why this code doesn't work.
[squirrel]
Code:
function1();
function function1()
{
    print("Successful");
}
Squirrel interprets your program rather then compile and execute.
So, it first executes the first line of the code without compiling the whole code, that means, function1 is not yet present in the global table and so doesn't work.
My question: How to "PRINT ALL THE VALUES OF AN ARRAY WITHOUT USING ANY LOOP CONTROL STATEMENTS" Languages allowed: JS or Squirrel or any other dynamic language.
Pretty simple one.
Code:
local array = ["KAKAN", "Pitch", "v0t"];
array.apply(function (v) {print(v); return v;});
My question: How do you print a triangle like this:
Code:

@
@@
@@@
@@@@
with a specified height using a foreach loop using squirrel

p.s. the hardest part of these questions is coming up with your own question

[You must be registered and logged in to see this link.] wrote:Please write question or i will ask a one
Code:
Dim Flake As String
write the value of "flake" when we get the value of physical memory :v?
v0t?

just put a new question

_______________________________________
[You must be registered and logged in to see this image.]
Credits to: MaSoN^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 6183
Points : 7317
Reputation : 102
Join date : 2016-02-13
Age : 20
Location : Here >:)

Back to top Go down

Re: Programming Topic - Official One

Post by VK.Angel.OfDeath on Thu Feb 02, 2017 12:32 pm

Carl has two apples, write a program that steals one of Carl's apple. AI required.

_______________________________________
[You must be registered and logged in to see this image.]


[You must be registered and logged in to see this image.]
avatar
VK.Angel.OfDeath
Chief of the Community
Chief of the Community

Posts : 4470
Points : 6169
Reputation : 110
Join date : 2012-10-28
Age : 24

Back to top Go down

Re: Programming Topic - Official One

Post by Lahhami^ on Thu Feb 02, 2017 1:21 pm

[You must be registered and logged in to see this link.] wrote:Carl has two apples, write a program that steals one of Carl's apple. AI required.

Program Done ,Here Carlos Apple's Completly Program !
Enjoy it With some Sturct's and pointer's .
i put some note's almost  each Command's /Function's/sturct's .

Code:

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h> // printf & scanf
#include <stdlib.h> // malloc, free functions
#include <math.h> // sqrt,pow,abs functions

// point
typedef struct {
 double Apple_precent;
 double Apple_Kind;
}CarlApples;

/* functions prototype */

Point* setApples(int *pnts);

/* main function */

oid main() {
 CarlApples *ps;
 int pnts;
 // setting array of points
 ps = setApples(&pnts);
 // printing them out before sorting
 printf("\nPoints Apple's before sorting:\n\n");
 printApples(ps,pnts);
 // sorting Apples
 sortApples(ps,pnts);
 // printing them out after sorting
 printf("\nPoints after sorting:\n\n");
 printApples(ps, pnts);
 // freeing up Apples array
 free(ps);
}

Point* setApples(int *pnts) {
 int i;
 CarlApples *pArr;
 printf("How many points do u wish to generate? ");
 scanf("%d", pnts);

 pArr = (Point*)malloc(sizeof(CarlApples)*(*pnts));

 for (i = 0; i < *pnts; i++) {
 printf("CarlApple(%d):\n", i + 1);
 printf("Enter first quantity:");
 scanf("%lf", &pArr[i].x);
 printf("Enter second quantity:");
 scanf("%lf", &pArr[i].y);
 printf("\n");
 }

 return pArr;
}

void sortApples(Point *pArr, int pnts) {
 int i, j;
 // sorting using bubble sort algorithm
 for (i = 1; i < pnts; i++)
 for (j = 0; j < pnts - i; j++)
 if (compareApple(&pArr[j], &pArr[j + 1]) == 1)
 SwapApples(&pArr[j], &pArr[j + 1]);
}
// this function compares between 2 given Apple's
int compareApple(Point *p1,Point *p2) {
 CarlApples origin = { 0,0 };
 double d1 = distance(p1, &origin);
 double d2 = distance(p2, &origin);

 if ((d1 - d2) < 0.0001)
 return 0;

 if (d1 > d2)
 return 1;
 return 2;
}
// this function swaps between 2 given Apple's
void SwapApples(Point *p1, Point *p2) {
 CarlApples tmp;

 tmp = *p1;
 *p1 = *p2;
 *p2 = tmp;
}

P.S : It was homework Univ and i have many program's that i Made . i just made some edit's but acually i made it , if anyone want to ask about this code then ask and dont shy

#LahhamOnService
avatar
Lahhami^
Server Admin
Server Admin

Posts : 1261
Points : 1663
Reputation : 2
Join date : 2016-08-06
Age : 23
Location : Opssi World!

Back to top Go down

Re: Programming Topic - Official One

Post by BABA1 on Fri Feb 03, 2017 2:32 pm

C# is so much like Java, I just noticed some different importing keywords nothing else.
They use using and I use import
avatar
BABA1
Legendary Member
Legendary Member

Posts : 2016
Points : 2334
Reputation : 25
Join date : 2014-09-27
Age : 17
Location : fux off again pls

http://ass-clan.team-forum.net/

Back to top Go down

Re: Programming Topic - Official One

Post by Zeyad_Ahmed on Fri Feb 03, 2017 3:07 pm

[You must be registered and logged in to see this link.] wrote:C# is so much like Java, I just noticed some different importing keywords nothing else.
They use using and I use import
VB.net are not simmilar in Syntax but they have the same .net framework
in vb.net i use Imports :v
in C# they write [ (Data Type) (.....) = (value)]
in vb.net we write Dim (.....) As (DataType) = (value)
Let me ask a question
If you have a file called andrisucks.rtf and you have to open it in richtextbox with plain text format
write the code :v
avatar
Zeyad_Ahmed
Legendary Member
Legendary Member

Posts : 1327
Points : 1537
Reputation : -11
Join date : 2016-05-15
Age : 16
Location : Discord

Back to top Go down

Re: Programming Topic - Official One

Post by =SdS=KrlozZ... on Fri Feb 03, 2017 10:12 pm

[EK]KillerLaham wrote:
[You must be registered and logged in to see this link.] wrote:Carl has two apples, write a program that steals one of Carl's apple. AI required.

Program Done ,Here Carlos Apple's Completly Program !
Enjoy it With some Sturct's and pointer's .
i put some note's almost  each Command's /Function's/sturct's .

Code:

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h> // printf & scanf
#include <stdlib.h> // malloc, free functions
#include <math.h> // sqrt,pow,abs functions

// point
typedef struct {
 double Apple_precent;
 double Apple_Kind;
}CarlApples;

/* functions prototype */

Point* setApples(int *pnts);

/* main function */

oid main() {
 CarlApples *ps;
 int pnts;
 // setting array of points
 ps = setApples(&pnts);
 // printing them out before sorting
 printf("\nPoints Apple's before sorting:\n\n");
 printApples(ps,pnts);
 // sorting Apples
 sortApples(ps,pnts);
 // printing them out after sorting
 printf("\nPoints after sorting:\n\n");
 printApples(ps, pnts);
 // freeing up Apples array
 free(ps);
}

Point* setApples(int *pnts) {
 int i;
 CarlApples *pArr;
 printf("How many points do u wish to generate? ");
 scanf("%d", pnts);

 pArr = (Point*)malloc(sizeof(CarlApples)*(*pnts));

 for (i = 0; i < *pnts; i++) {
 printf("CarlApple(%d):\n", i + 1);
 printf("Enter first quantity:");
 scanf("%lf", &pArr[i].x);
 printf("Enter second quantity:");
 scanf("%lf", &pArr[i].y);
 printf("\n");
 }

 return pArr;
}

void sortApples(Point *pArr, int pnts) {
 int i, j;
 // sorting using bubble sort algorithm
 for (i = 1; i < pnts; i++)
 for (j = 0; j < pnts - i; j++)
 if (compareApple(&pArr[j], &pArr[j + 1]) == 1)
 SwapApples(&pArr[j], &pArr[j + 1]);
}
// this function compares between 2 given Apple's
int compareApple(Point *p1,Point *p2) {
 CarlApples origin = { 0,0 };
 double d1 = distance(p1, &origin);
 double d2 = distance(p2, &origin);

 if ((d1 - d2) < 0.0001)
 return 0;

 if (d1 > d2)
 return 1;
 return 2;
}
// this function swaps between 2 given Apple's
void SwapApples(Point *p1, Point *p2) {
 CarlApples tmp;

 tmp = *p1;
 *p1 = *p2;
 *p2 = tmp;
}

P.S : It was homework Univ and i have many program's that i Made . i just made some edit's but acually i made it , if anyone want to ask about this code then ask and dont shy

#LahhamOnService

NOOO!!! WAIT NO PLS! My dear apple TnT

_______________________________________
[You must be registered and logged in to see this image.]
Credits to: MaSoN^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 6183
Points : 7317
Reputation : 102
Join date : 2016-02-13
Age : 20
Location : Here >:)

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Sat Feb 04, 2017 5:08 am

[EK]KillerLaham wrote:
[You must be registered and logged in to see this link.] wrote:Carl has two apples, write a program that steals one of Carl's apple. AI required.

Program Done ,Here Carlos Apple's Completly Program !
Enjoy it With some Sturct's and pointer's .
i put some note's almost  each Command's /Function's/sturct's .

Code:

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h> // printf & scanf
#include <stdlib.h> // malloc, free functions
#include <math.h> // sqrt,pow,abs functions

// point
typedef struct {
 double Apple_precent;
 double Apple_Kind;
}CarlApples;

/* functions prototype */

Point* setApples(int *pnts);

/* main function */

oid main() {
 CarlApples *ps;
 int pnts;
 // setting array of points
 ps = setApples(&pnts);
 // printing them out before sorting
 printf("\nPoints Apple's before sorting:\n\n");
 printApples(ps,pnts);
 // sorting Apples
 sortApples(ps,pnts);
 // printing them out after sorting
 printf("\nPoints after sorting:\n\n");
 printApples(ps, pnts);
 // freeing up Apples array
 free(ps);
}

Point* setApples(int *pnts) {
 int i;
 CarlApples *pArr;
 printf("How many points do u wish to generate? ");
 scanf("%d", pnts);

 pArr = (Point*)malloc(sizeof(CarlApples)*(*pnts));

 for (i = 0; i < *pnts; i++) {
 printf("CarlApple(%d):\n", i + 1);
 printf("Enter first quantity:");
 scanf("%lf", &pArr[i].x);
 printf("Enter second quantity:");
 scanf("%lf", &pArr[i].y);
 printf("\n");
 }

 return pArr;
}

void sortApples(Point *pArr, int pnts) {
 int i, j;
 // sorting using bubble sort algorithm
 for (i = 1; i < pnts; i++)
 for (j = 0; j < pnts - i; j++)
 if (compareApple(&pArr[j], &pArr[j + 1]) == 1)
 SwapApples(&pArr[j], &pArr[j + 1]);
}
// this function compares between 2 given Apple's
int compareApple(Point *p1,Point *p2) {
 CarlApples origin = { 0,0 };
 double d1 = distance(p1, &origin);
 double d2 = distance(p2, &origin);

 if ((d1 - d2) < 0.0001)
 return 0;

 if (d1 > d2)
 return 1;
 return 2;
}
// this function swaps between 2 given Apple's
void SwapApples(Point *p1, Point *p2) {
 CarlApples tmp;

 tmp = *p1;
 *p1 = *p2;
 *p2 = tmp;
}

P.S : It was homework Univ and i have many program's that i Made . i just made some edit's but acually i made it , if anyone want to ask about this code then ask and dont shy

#LahhamOnService
oid main()?

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Chuck Norris on Sat Feb 04, 2017 7:22 am

oid is the cousin of void, oid returns your taxes in the mail.
avatar
Chuck Norris
Secret Intelligence Agent of the Community

Posts : 3180
Points : 5491
Reputation : 1405
Join date : 2012-10-14
Location : None

http://vkserver.big-forum.net

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Sat Feb 04, 2017 7:39 am

Another thing, it's supposed to be int main, not [v]oid main.

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by Chuck Norris on Sat Feb 04, 2017 7:43 am

[You must be registered and logged in to see this link.] wrote:Another thing, it's supposed to be int main, not [v]oid main.

But main doesn't return anything, why should it be an int?
avatar
Chuck Norris
Secret Intelligence Agent of the Community

Posts : 3180
Points : 5491
Reputation : 1405
Join date : 2012-10-14
Location : None

http://vkserver.big-forum.net

Back to top Go down

Re: Programming Topic - Official One

Post by EK.CrystalBlue on Sat Feb 04, 2017 8:29 am

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:Another thing, it's supposed to be int main, not [v]oid main.

But main doesn't return anything, why should it be an int?
It's just more standard to use int main instead of void main

_______________________________________
Allah knows best.

[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
avatar
EK.CrystalBlue
Deputy Chief of the Community
Deputy Chief of the Community

Best christ 15
Homocide detective
Pizza Expert
Posts : 3628
Points : 4126
Reputation : 22
Join date : 2012-10-31
Age : 25
Location : I am CRYSTAL u never found me!!!!!

Back to top Go down

Re: Programming Topic - Official One

Post by KAKAN on Sat Feb 04, 2017 8:42 am

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:Another thing, it's supposed to be int main, not [v]oid main.

But main doesn't return anything, why should it be an int?
It's just more standard to use int main instead of void main
Using void works, and you should use it when you don't want to return something.
avatar
KAKAN
Legendary Member
Legendary Member

Posts : 3506
Points : 4006
Reputation : 16
Join date : 2014-09-28
Age : 14
Location : World

Back to top Go down

Re: Programming Topic - Official One

Post by Lahhami^ on Sat Feb 04, 2017 9:23 am

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:Another thing, it's supposed to be int main, not [v]oid main.

But main doesn't return anything, why should it be an int?
It's just more standard to use int main instead of void main
firstly , i miss that letter 'V' , its acually void .(or cousin void )

second , main dont have to be int  and "void main" more standard than "int main" .(as i dont see int main before and main dont return something)

Third ,
Void = When you wanna print something or wanna make some change's on variables (by sending variable/s address like " &x ")

int/double/int*/float*/Struct*/ : when you want to Create something then Return it , for example let's say we want's function will create char array not by " char arr[N]; " by(Dynamic allocation)  and  then return the address of new array (Address is'nt like int/float/etc , its int*/float*/etc ) .
(1)
this is the function itself , so on Void main you can send anysize you want .
Code:

Char * CreatingNewCharArr(Int Size)
{
char *NewArray = (char *) malloc (sizeof(char) * Size); // Dynamic allocation
return NewArray ;
}

(2.1)
another qsk that say's to recieve 5 number's on array then Return sum/multOfthem(remmeber its 2 value's not 1)
Code:

Void PrintSumMul()
{
int num,sum=0,mult=1;

for(i=0;i<=4;i++)
{
scanf(" %d",&num); // recieving
sum+=num;
mul*=num;
}
printf("the sum iz : %d " , sum);
printf("the Mult iz : %d " , mul);

(2.2)
Same qsk But return 2 value's(By address's) and then you can print value's on Main func .
Code:


Void ChangeSumMulByAddress(int *sum,int *mul)
{
for(i=0;i<=4;i++)
{
scanf(" %d",&num); // recieving
(*sum)+=num;
(*mul)*=num;
}

P.S: if you dont knew what pointer's iz then its kind like hard to understand .
avatar
Lahhami^
Server Admin
Server Admin

Posts : 1261
Points : 1663
Reputation : 2
Join date : 2016-08-06
Age : 23
Location : Opssi World!

Back to top Go down

Re: Programming Topic - Official One

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum