answersLogoWhite

0

#!/bin/bash

s=0
c=1
while [$c-le 100]
do
s='expr $s + $c'
c='expr $c + 1'
done
echo "Sum of 1 to 100 is $s"

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

Write a program in C for arithmetic operations between two integers your program should guide users with proper message or menu on the console?

Write a program in C for showing working of different logical operator in C.Your program should guide users with proper message/menu on the console. (5 Marks)


Which software program displays advertising on your computer?

youtube


C program that displays integers 1 TO 9?

#include <cstdio> int main() { int x = 1; while(x < 10) { printf("%d ", x); x++; } char wait; scanf("%s", wait); return 0; }


What is a rectangular box that displays information or a program?

A screen (VDU).


What displays the name of the document and the name of the program?

title bar


Write a c program which displays digital watch on the screen after taking the hours and minutes from the user?

Write a program which displays digital watch on the screen, after taking the hours and minutes from the user.


Writes a c program to find the sum of all integers between 1 and n?

Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11


When you get the message this program is not responding what does that mean and what causes it to do that?

the program is not working


What is the rectangular box that displays information or a program on windows 7?

a window


Write a shell program that Adds the integers 1 to 100 and dislay a message?

SUM = 0: FOR N = 1 to 100: SUM = SUM + N: Next N: PRINT CHR$(11); "Sum ="; SUM: END


How can one assign a list of integers in Java?

Put statements at the start of ones code will allow one to have a list of integers in their Java program. If one does this then they will successfully have integers in their code.


How do you reverse of the answer program integers in C programming?

sense question Your makes no.