隐藏C#到C [英] Covert C# to C

查看:60
本文介绍了隐藏C#到C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以将此C#代码转换为C


private void Caller()

{

Int32 a = 5 ;

partation(a,a,"");

}


private void partation(Int32 n,Int32 m,String s)

{

Int32 i;

if(n> 0)

{

for(i = Math.Min(n,m); i 0; i--)

partation(n - i,i,s + i.ToString()) ;


}

其他

{

Console.WriteLine(s); //这可以作为一个Printf我把它想象......

}

}

Can someone please convert this C# code to C

private void Caller()
{
Int32 a = 5;
partation(a, a, "");
}

private void partation(Int32 n, Int32 m, String s)
{
Int32 i;
if(n>0)
{
for (i = Math.Min(n, m); i 0; i--)
partation(n - i, i, s + i.ToString());

}
else
{
Console.WriteLine(s); //This can be put as a Printf i
think...
}
}

推荐答案

为什么?由于C,不是.NET语言,为什么要转换为它?

< in ******** @ gmail.comwrote in message

news :ba ********************************** @ v13g2000 pro.googlegroups.com ...
Why? Since "C" is not a .NET language, why do you want to convert to it?
<in********@gmail.comwrote in message
news:ba**********************************@v13g2000 pro.googlegroups.com...

有人可以将此C#代码转换为C


private void Caller()

{

Int32 a = 5;

partation(a,a,"");

}


private void partation(Int32 n,Int32 m,String s)

{

Int32 i;

if(n> 0)

{

for(i = Math.Min(n,m); i 0; i--)

partation(n - i,i ,s + i.ToString());


}

其他

{

控制台.WriteLine(一个或多个); //这可以作为一个Printf我想b $ b想想......

}

}
Can someone please convert this C# code to C

private void Caller()
{
Int32 a = 5;
partation(a, a, "");
}

private void partation(Int32 n, Int32 m, String s)
{
Int32 i;
if(n>0)
{
for (i = Math.Min(n, m); i 0; i--)
partation(n - i, i, s + i.ToString());

}
else
{
Console.WriteLine(s); //This can be put as a Printf i
think...
}
}



Scott M.写道:
Scott M. wrote:

为什么?由于C,不是.NET语言,为什么要转换为

呢?
Why? Since "C" is not a .NET language, why do you want to convert to
it?



为什么不呢?我猜他已经找到了一些C#代码并希望在他的C程序中使用

分区算法。

-

Rudy Velthuis http://rvelthuis.de


所以我去了去看牙医。他说Say Aaah。我说为什么?

他说我的狗已经死了。 - Tommy Cooper

Why not? I guess he has found some C# code and wants to use the
partitioning algorithm in his C program.
--
Rudy Velthuis http://rvelthuis.de

"So I went to the dentist. He said "Say Aaah." I said "Why?"
He said "My dog''s died.''" -- Tommy Cooper


他希望别人为他做他的工作。 :-)


-

Gregory A. Beamer

MVP,MCP:+ I,SE,SD,DBA


订阅我的博客
http: //feeds.feedburner.com/GregoryBeamer#


或只是阅读它:
http://feeds.feedburner.com/GregoryBeamer


********** ********************************** *

|创造性思考! |

***************************************** ***

" Rudy Velthuis" < ne ******** @ rvelthuis.dewrote in message

news:xn ************** @ news.microsoft.com .. 。
And he wants someone else to do his work for him. :-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"Rudy Velthuis" <ne********@rvelthuis.dewrote in message
news:xn**************@news.microsoft.com...

Scott M.写道:
Scott M. wrote:

>为什么?由于C,不是.NET语言,为什么要转换为
呢?
>Why? Since "C" is not a .NET language, why do you want to convert to
it?



为什么不呢?我猜他已经找到了一些C#代码,并希望在他的C程序中使用

分区算法。


-

Rudy Velthuis http://rvelthuis.de


"所以我去了牙医。他说Say Aaah。我说为什么?

他说我的狗已经死了。 - Tommy Cooper


Why not? I guess he has found some C# code and wants to use the
partitioning algorithm in his C program.
--
Rudy Velthuis http://rvelthuis.de

"So I went to the dentist. He said "Say Aaah." I said "Why?"
He said "My dog''s died.''" -- Tommy Cooper


这篇关于隐藏C#到C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆