patA1058 第二种方法

#include <iostream>
#include <cstdio> 
using namespace std;
int main(int argc, char** argv) {
int g1,s1,k1,g2,s2,k2;
scanf("%d.%d.%d %d.%d.%d",&g1,&s1,&k1,&g2,&s2,&k2);
int carrys=0,carryg=0;
int g,s,k;
k=(k1+k2)%29;
carrys=(k1+k2)/29;
s=(s1+s2+carrys)%17;
carryg=(s1+s2+carrys)/17;
g=(g1+g2+carryg);
printf("%d.%d.%d",g,s,k);
return 0;

}


JS+C#实现FusionChart第二种方法

11-27

从网上看到一个实例,代码如下:rnrn后台([color=#FF0000]看上去很长,其实没什么,就是拼接字符串[/color]):rnstem;rnusing System.Collections.Generic;rnusing System.Linq;rnusing System.Web;rnusing System.Web.UI;rnusing System.Web.UI.WebControls;rnusing System.Text;rnrnnamespace FCFDemornrn public partial class ResponseAppend : System.Web.UI.Pagern rn protected void Page_Load(object sender, EventArgs e)rn rn rn rn public void Xml()rn rnrn StringBuilder str = new StringBuilder();rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rnrn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rn str.Append("");rnrnrn String str1 = str.ToString();rnrn /*Encoding Default = Encoding.Default;rn Encoding GB2312 = Encoding.GetEncoding("GBK");rnrn byte[] temp = Default.GetBytes(str1);rnrn String res = GB2312.GetString(temp);*/rnrn //ViewData["list"] = res;rnrn /*String path = Server.MapPath("~/");rn if (!System.IO.File.Exists(path + "data.xml")) rn System.IO.File.Create(path + "data.xml");rn rnrn StreamWriter sw = new StreamWriter(path + "data.xml", false,GB2312);rn sw.Write(res);rn sw.Close();*/rnrn [color=#FF0000]Response.Clear();rn Response.ClearHeaders();rn Response.ContentEncoding = Encoding.GetEncoding("GB2312");rn Response.Write(str1);rn[/color]rn Response.Flush();rn Response.End();rnrn rn rnrnrn前台代码:rn<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ResponseAppend.aspx.cs" Inherits="FCFDemo.ResponseAppend" %>rnrnrnrnrnrn rnrnrn rn rn rn rn rn rnrnrn[color=#FF0000]rn问题:XML文本内容是直接被“.aspx”页面输出的,没有在本地创建“xml文件”,这“Url.Action("Xml","Home")”这个方法应该怎样写呢???[/color]rnrn不知道“Url.Action”怎样实现,关键是没有在本地创建XML文件。这时应该怎么办???

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试