Latest topics
» Unban request
by iNs.Force Today at 3:49 am

» Spree 6 with chainsaw (Hack claimed)
by Jamez Today at 3:23 am

» Stats Transfer - Killerco..!
by Jamez Today at 2:37 am

» [Accepted] player report - Javier_Montesinos
by KuRuMi^ Today at 12:06 am

» Account pass reset applicaton
by SaMiR^ Yesterday at 11:18 pm

» Suggestion - Flood Control
by Halo Yesterday at 9:07 pm

» Suggestions
by Halo Yesterday at 9:05 pm

» Bug - Treasurehunting
by Halo Yesterday at 9:03 pm

» Bug Report - Spawning at default location instead of the prop location
by Halo Yesterday at 8:59 pm

» Unban Request - We3da
by Halo Yesterday at 8:44 pm

» VCMP - LMS Event.
by Halo Yesterday at 8:40 pm

» [Denied] FPS Limiter
by =SdS=KrlozZ... Yesterday at 6:55 pm

» [Solved] Transfer my stats
by =SdS=KrlozZ... Yesterday at 6:53 pm

» [Solved] Nick change Application - LyzoR
by =SdS=KrlozZ... Yesterday at 5:18 pm

» [Solved] Transfer Name.
by =SdS=KrlozZ... Yesterday at 5:16 pm

Top posters
ЧК. (6835)
 
MaSoN^ (6073)
 
=SdS=KrlozZ... (5703)
 
=KF=Thunder^ (5251)
 
VK.Angel.OfDeath (4168)
 
IHateVCMP (3837)
 
Arnold^ (3702)
 
KAKAN (3507)
 
EK.CrystalBlue (3488)
 
D.E.[[V]].I.L (3191)
 

Statistics
We have 1034 registered users
The newest registered user is harcoskerem

Our users have posted a total of 134543 messages in 8997 subjects
[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

October 2017 Update - Small update today + Discussing things like usual.

Sun Oct 22, 2017 9:31 am by Chuck Norris

Well guys I will bring out a small update tomorrow fixing a few bugs + adding a halloween theme similar to the christmas one. It won't be anything Amazing, but there will be presents and custom content for you to enjoy while joining during halloween.

There seems to be a decreasing amount of players on the server not sure if people are just getting tired of the server, VC-MP or if it's something else. I don't think it has to do with anything I am doing, so I will just continue to script like usual. What I am planning to script is nothing big, you can expect Another minigame/job for patch 4.1 to fill out the rewards I missed from patch 4.0, you can probably also expect some NPC update + maybe a test of discord. I am not sure where the server is going, I have been doing it for so many years and I have already scripted so many things that I didn't think was possible. What we have to face is that some time in the future there might not be much more I can add and I can simply …

[ Full reading ]

Comments: 20

September 2017 Update - Patch 4.0 estimated release date, plans after that and halloween

Sun Sep 17, 2017 7:49 pm by Chuck Norris

Patch 4.0
I feel like I have to set a release date for myself and that release date will be between the 30th and 7th of october. I have really tried my best to just script a whole bunch of things for patch 4.0 which will hopefully make it worthy of it's x.0 name, just like patch 3.0 was. This is probably the first patch ever where I have scripted something for everyone. If you remember that topic I made where you guys voted for 9 things. I feel like I gave at least something in all categories. I truly gave it all for at least the things you guys gave the most vote to. I don't Think anyone will say: that I didn't give you lots of custom content for example.

More content will come in the future after patch 4.0 and I really hope you'll all be happy with patch 4.0 when it comes out.


Status of where I am: I have this weekend organized my last todo list and some testing that needs to be done. Next weekend I will work like hell to get it all done or at least as much as I can so it …

[ Full reading ]

Comments: 25

Angel back to the university - Scripting update

Thu Aug 24, 2017 7:12 am by VK.Angel.OfDeath

Hey guys. I've been scripting for everyday since the beginning of june, because I have had summer vacation from my studying. Next week (so after this sunday) I will not be able to script for the server everyday. I will only script on saturday/sunday.

I would say I got 25 % left to script for (my stuff) in patch 4.0 and that I could probably script some suggestions as well. Patch 4.0 is hard, because it has to add a lot of things since it's a big milestone, after this patch is released I can go back to scripting normal patches again.

From about next week and forward I will only be scripting 2 days a week (sunday and saturday). I got an exam today so I won't be scripting today (yes I know I am posting this on an exam day, but I really have nothing else to do Before it starts xD). Tomorrow on friday to sunday I will try to script as much as possible.

as I said Before I hope patch 4.0 is released in september and after that I am most likely going to focus on …

[ Full reading ]

Comments: 25

August Updates 2 - I made my decision about the next patch + Information revealed.

Tue Aug 15, 2017 11:15 am by Chuck Norris

Before you reply: If you are not happy with anything in this post you are free to provide criticism, but please note two things:

1. Read the Community Manager vs Community section properly and try to address it when you post a reply.

2. Do not make threats to you will leave or insults to me. I am under a lot of preasure and as a leader I have to make tough decisions I can't save everyone and I can't please everyone. If you say stuff like that I will immediately throw your opinion away and cut ties with you in anyway.

This post is going to be tough on me and It might be last post in the staff depending on how you guys handle these two recommendations. (Even if that is the case I will still script for the server of course)

The Community vs the Community manager
As the Community manager and the scripter I represent the vision this server has and I respresent every single person who has ever joined the server. The vision I have is very specific and too long to be brought up in …

[ Full reading ]

Comments: 33

August Updates - Patch 3.7/4.0 & 3.6.2 Sliding??? Information and please read.

Mon Jul 31, 2017 10:00 am by Chuck Norris

Sliding won't work in rel004 apparently.
According to some people sliding doesn't work in rel004, that would mean that updating to this version would probably upset a lot of people. I want to hear from you guys, are you okay with this?


Patch 3.6.2
I am Little confused whether or not I should release patch 3.6.2 or release it together with patch 3.7, to make that patch even bigger. I Think people will be upset that patch 3.6.2 mostly contains improvements and bug fixes, (apart from maybe 4 minor things). What do you guys Think I should do?

Patch 3.7 or 4.0
Same thing here, I can do things with patch 3.7 that would go great with 4.0 and actually change the server a Little. So I am not sure if I should release it as patch 4.0 or 3.7.

Comments: 25

May Update - Patch 3.6 and just talking.

Sun May 21, 2017 4:24 pm by VK.Angel.OfDeath

Hey guys sorry about patch 3.6 not being released at the start of May. I am bad at keeping my promises, but the truth is: Scripting for the server is a lot of hard work. I work from 8 am to 7 pm on weekdays and usually have a lot to do on the weekends as well. I am scripting the server because I Think it's fun, but I get a lot of stress from working on it sometimes. The server has gotten so big and there is so much new things to script and at the same time improve the old stuff. I know most of the people on the forum don't do minigames like races and other things, but I still want to expand on that as well. The property system is Always something I am proud of and you guys are really going to enjoy the upcoming updated in patch 3.6 for that.

In the summer which starts in about 2-3 weeks for me, I am going to be scripting a lot as long I don't lose all my motivation. Patch 3.6 will be released soon, but I want this patch to be special and therefor I want to get a lot of work …

[ Full reading ]

Comments: 26


Programming Topic - Official One

View previous topic View next topic 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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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 : 3488
Points : 3979
Reputation : 21
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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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 : 3488
Points : 3979
Reputation : 21
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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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 : 3488
Points : 3979
Reputation : 21
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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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 : 3488
Points : 3979
Reputation : 21
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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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 : 3488
Points : 3979
Reputation : 21
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 : 2637
Points : 4824
Reputation : 1397
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 : 3488
Points : 3979
Reputation : 21
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 : 2637
Points : 4824
Reputation : 1397
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 : 3488
Points : 3979
Reputation : 21
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 : 2637
Points : 4824
Reputation : 1397
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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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 : 2637
Points : 4824
Reputation : 1397
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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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: KuRiMi^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 5703
Points : 6705
Reputation : 98
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 : 1188
Points : 1556
Reputation : 0
Join date : 2016-08-06
Age : 22
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 : 3507
Points : 4011
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 : 3488
Points : 3979
Reputation : 21
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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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 : 3488
Points : 3979
Reputation : 21
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 : 2637
Points : 4824
Reputation : 1397
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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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 :/

_______________________________________
[You must be registered and logged in to see this image.]
"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 the VKs community, especially haters.
avatar
KuRuMi^
Full Server Admin
Full Server Admin

Moderator 1
Posts : 1881
Points : 2123
Reputation : 24
Join date : 2016-06-25
Age : 19
Location : Walking through time...

http://deserver.createaforum.net

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 : 3507
Points : 4011
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 : 3488
Points : 3979
Reputation : 21
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 : 3507
Points : 4011
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 : 3488
Points : 3979
Reputation : 21
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: KuRiMi^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 5703
Points : 6705
Reputation : 98
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 : 3488
Points : 3979
Reputation : 21
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: KuRiMi^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 5703
Points : 6705
Reputation : 98
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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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: KuRiMi^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 5703
Points : 6705
Reputation : 98
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 : 3488
Points : 3979
Reputation : 21
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: KuRiMi^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 5703
Points : 6705
Reputation : 98
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 : 4168
Points : 5717
Reputation : 108
Join date : 2012-10-28
Age : 23

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 : 1188
Points : 1556
Reputation : 0
Join date : 2016-08-06
Age : 22
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 : 2013
Points : 2328
Reputation : 25
Join date : 2014-09-27
Age : 16
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 : 1273
Points : 1480
Reputation : -11
Join date : 2016-05-15
Age : 15
Location : Dim Location As String = "In VK's Server"

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: KuRiMi^
avatar
=SdS=KrlozZ...
Head Server Admin
Head Server Admin

Moderator 1
Posts : 5703
Points : 6705
Reputation : 98
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 : 3488
Points : 3979
Reputation : 21
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 : 2637
Points : 4824
Reputation : 1397
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 : 3488
Points : 3979
Reputation : 21
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 : 2637
Points : 4824
Reputation : 1397
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 : 3488
Points : 3979
Reputation : 21
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 : 3507
Points : 4011
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 : 1188
Points : 1556
Reputation : 0
Join date : 2016-08-06
Age : 22
Location : Opssi World!

Back to top Go down

Re: Programming Topic - Official One

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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