ÇóÐòÁк͵ļòµ¥C³ÌÐò
¶ÔÓÚÐòÁÐÇóºÍµÄ³ÌÐò´ó¼Ò²»»áİÉú£¬¶øÎÒ½ñÌì¿´µ½µÄÕâ¸ö³ÌÐò¸öÈ˾õµÃ±È½ÏºÃ£¬ËùÒÔÌùÉÏÀ´¹²Ïíһϡ£
ÒªÇó£ºÊäÈëÀàËÆÓÚ87 98 67 56 0µÄÈÎÒâÐòÁУ¬µ«ÊÇÒÔÁã½áβ¡£È»ºóÊä³öÐòÁеĺ͡£
³ÌÐòÈçÏ £º
/********************************************
* Name : sum.c
* Purpose : sum
* Author : zimo
* Date : 01/21/2010
* *****************************************/
#include <stdio.h>
int main(void)
{
int n , sum = 0;
printf("This program sums a series of integers. \n");
printf("Enter integers (0 to terminate): ");
scanf("%d", &n);
while(n != 0)
{
sum += n;
scanf("%d", &n);
}
printf("The sum is: %d \n", sum);
return 0;
}
Á½´ÎµÄÊäÈëÓï¾ä¸öÈ˾õµÃ·Ç³£ºÃ¡££¨ËùÊäÈëµÄÐòÁÐÒªÇó±ØÐëÊÇ×îºóÒ»¸öÊýΪÁ㣬µ±È»Ò²¿ÉÒÔ¼òµ¥µÄÐ޸ģ©
Ïà¹ØÎĵµ£º
Visual C#ÊÇ΢Èí¹«Ë¾ÍÆ³öµÄÐÂÒ»´ú³ÌÐò¿ª·¢ÓïÑÔ£¬ÊÇ΢Èí.Net¿ò¼ÜÖеÄÒ»¸öÖØÒª×é³É²¿·Ö¡£ÆÁÄ»±£»¤³ÌÐòÊÇÒÔscrΪÀ©Õ¹ÃûµÄ±ê×¼Windows¿ÉÖ´ÐгÌÐò¡£ÆÁÄ»±£»¤³ÌÐò²»½ö¿ÉÒÔÑÓ³¤ÏÔʾÆ÷µÄʹÓÃÊÙÃü£¬»¹¿ÉÒÔ±£»¤Ë½ÈËÐÅÏ¢¡£±¾ÎÄÏò´ó¼Ò½éÉÜÒ»¸ö.Netƽ̨ÉÏÓÃC#±àдµÄÒ»¸ö¶¯Ì¬Îı¾¼°Í¼ÐÎµÄÆÁÄ»±£»¤³ÌÐò¡£
¡¡¡¡Ò»¡¢¾ßÌåʵÏÖ²½Ö裺
¡¡¡¡£ ......
1.¿ª·¢¹¤¾ßÏÂÔØ
TUBER C http://www.duote.com/soft/392.html
Turbo C 2.0 ºº»¯°æ http://www.programfan.com/showdown.asp?id=306
C-Free 4.0 http:/ ......
#include<stdlib.h>
#include<iostream>
#include<string.h>
using namespace std;
int main(void)
{
FILE *fp, *fp2;
char buf[1024*300];
fp = fopen("in.txt", "rb");
fp2 = fopen("out.txt", "wb+");
fseek(fp, 0, SEEK_END);
int iLen ......
µ½ÁËmain.c£¬Æäʵmain.cÖеĴ󲿷ֵÄÄÚÈÝÊǵ÷Óú¯ÊýÀ´ÊµÏÖ³õʼ»¯µÄ¹¤×÷£¬µ«ÊÇ»¹Êǽ«Ëü¿´ÍêÁË¡£ÏÂÃæ¾ÍÊÇ´úÂëÁË¡£Ö÷Òª²Î¿¼µÄÊÇlinuxÄÚºËÍêȫעÊÍ£¬ÔÚһЩ²»Ì«Ã÷°×µÄµØ·½£¬²Î¿¼ÍøÉϵĽéÉÜ¡£·Ï»°ÉÙ˵¡£»¹Óкܳ¤µÄ·°¡¡£Å¬Á¦°¡O(∩_∩)O~¡£
/*
* main.c¹¦ÄÜÃèÊö¡£
*/
//main.c³ÌÐòµÄÖ÷Òª¹¦ÄÜÊÇÀûÓÃsetup.s ......
Ò». Ê×ÏÈ×öÒ»¸ö¼òµ¥µÄsoÎļþ£º
/**
* hello.c
* To compile, use following commands:
* gcc -O -c -fPIC -o hello.o hello.c
* gcc -shared ......