How is C# better than C++? C# looks like clone of Java language to me.lamefun wrote:C++ will soon die in favor of better languages developed by Microsoft like C# and other .Net languages! Microsoft will likely develop even better languages!
C++/C/Pascal/basic/etc...
Moderator: Nod_Nod_Nod
With all respect, both C# and Java are better than C++ in 99% cases. The problem is that 1% where someone still has to know C++.Redman wrote:How is C# better than C++? C# looks like clone of Java language to me.lamefun wrote:C++ will soon die in favor of better languages developed by Microsoft like C# and other .Net languages! Microsoft will likely develop even better languages!
Do you know about compiler bootstrapping? I'm sure that even if .Net is in C++ now, it'll soon be in C#.Quarko wrote:A thing to think about: in what language is .Net framework written?lamefun wrote:C++ will soon die in favor of better languages developed by Microsoft like C# and other .Net languages! Microsoft will likely develop even better languages!
Then it's weird that most games, video editors, graphics editors, sound editors, libraries, operating systems and other programs were written in C/C++, not Java or C#.Quarko wrote:With all respect, both C# and Java are better than C++ in 99% cases. The problem is that 1% where someone still has to know C++.Redman wrote:How is C# better than C++? C# looks like clone of Java language to me.lamefun wrote:C++ will soon die in favor of better languages developed by Microsoft like C# and other .Net languages! Microsoft will likely develop even better languages!
So, since no one helped much , i had to learn everything myself and i managed to make a task without anyones help(only one friend told me that for chars is %c, not %d, so i had some weird result ^^), and i wanna share it here, if someone know how does it even work:
I amde it in 30 mins, and i know a skilled programmer would make it in 2 minutes, but im not a pro ^^
Code: Select all
#include <iostream>
#include <stdio>
using namespace std;
int main()
{
int x;
int y=0;
char f,g,h,i,j;
scanf("%d",&x);
scanf(" %c",&f);
scanf(" %c",&g);
scanf(" %c",&h);
scanf(" %c",&i);
scanf(" %c",&j);
int a=x/10000;
x=x%10000;
int b=x/1000;
x=x%1000;
int c=x/100;
x=x%100;
int d=x/10;
x=x%10;
int e=x;
if(f=='D') y=y+a;
if(g=='D') y=y+b;
if(h=='D') y=y+c;
if(i=='D') y=y+d;
if(j=='D') y=y+e;
printf("%d",y);
return 0;
}
My Youtube Channel:
Please help my ass and click on link, im a poor bitch...(+ ill make some trem videos too )
http://adf.ly/2qaKp
Please help my ass and click on link, im a poor bitch...(+ ill make some trem videos too )
http://adf.ly/2qaKp
I think this program was supposed to load a 5-digit integer and set every n-th digit to zero if n-th character is not 'D'. I would do it that way:
Code: Select all
int main()
{
int i,n;
char c[5], ns[6];
scanf("%d %c%c%c%c%c",&x,&c[0],&c[1],&c[2],&c[3],&c[4],&c[5]);
snprintf(ns,6,"%i",n);
for(i=0;i<5;i++)
if(c[i]!='D') ns[i]='0';
printf("%s",ns);
}
Wrong. His code does this:Redman wrote:I think this program was supposed to load a 5-digit integer and set every n-th digit to zero if n-th character is not 'D'. I would do it that way:Code: Select all
int main() { int i,n; char c[5], ns[6]; scanf("%d %c%c%c%c%c",&x,&c[0],&c[1],&c[2],&c[3],&c[4],&c[5]); snprintf(ns,6,"%i",n); for(i=0;i<5;i++) if(c[i]!='D') ns[i]='0'; printf("%s",ns); }
Input: Source 5 digit number (for example: 12345)
Input: Mask of operations (for example: D00D0)
Result: Sum of all digits that correspond to letter 'D' in given mask. Our example: 1 + 4 = 5 (because first letter D corresponds to '1' and last letter D to '4')
Quarko is right. First input is 5 digit numb, after that its D OR K(d=dugi=long) or K(k=kratki=short). And then make sum of all digits that had D in its position and ignore any other charQuarko wrote:Wrong. His code does this:Redman wrote:I think this program was supposed to load a 5-digit integer and set every n-th digit to zero if n-th character is not 'D'. I would do it that way:Code: Select all
int main() { int i,n; char c[5], ns[6]; scanf("%d %c%c%c%c%c",&x,&c[0],&c[1],&c[2],&c[3],&c[4],&c[5]); snprintf(ns,6,"%i",n); for(i=0;i<5;i++) if(c[i]!='D') ns[i]='0'; printf("%s",ns); }
Input: Source 5 digit number (for example: 12345)
Input: Mask of operations (for example: D00D0)
Result: Sum of all digits that correspond to letter 'D' in given mask. Our example: 1 + 4 = 5 (because first letter D corresponds to '1' and last letter D to '4')
My Youtube Channel:
Please help my ass and click on link, im a poor bitch...(+ ill make some trem videos too )
http://adf.ly/2qaKp
Please help my ass and click on link, im a poor bitch...(+ ill make some trem videos too )
http://adf.ly/2qaKp
- Nod_Nod_Nod
- Tyrant
- Posts: 1079
- Joined: Sun Mar 14, 2010 6:58 pm
- Location: Poland
- Contact:
I too made a program, but im not sure if I made any mistakes.
Buahahhah Hhah haha Lol
Code: Select all
#include <iostream>
#include <cstdio>
#include <conio>
#include <quarko>
using namespace std;
int main()
{
cout << "Hello World";
cin.ignore;
getchar();
return 0;
}
The nodding of the head once to symbolize a greeting, cuz we white folk to damn lazy to open our mouths and speak up. Nods are also easier to shake off than a flase "hello".
"Person nods at you", or your direction, "you nod back"
"Person nods at you", or your direction, "you nod back"
Personally, I'dd start with something more simple.
this language is a good candidate for beginners.
this language is a good candidate for beginners.
zap zap zap