#! /usr/bin/perl -w # This file is part of ff3d - http://www.freefem.org/ff3d # Copyright (C) 2003 Laboratoire J.-L. Lions UPMC Paris # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # $Id: for.pl,v 1.1 2003/08/04 09:26:42 ArceneL Exp $ # Checking the "for" keyword. require 'check.ph'; Run(<< 'EOF'); // Sum of first N integers. double sum = 0; for(double i = 1;i <= 10;i = i+1) sum = sum + i; cout << "sum = " << sum << "\n"; EOF NumCheck('^sum = ',55); Report();