From fdab4d11d70cd2b2119953d4a71ce94d97fa7b3a Mon Sep 17 00:00:00 2001 From: Md Altamash <91662197+md1altamash@users.noreply.github.com> Date: Sat, 19 Oct 2024 19:10:20 +0530 Subject: [PATCH] Create loop --- C++/loop | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 C++/loop diff --git a/C++/loop b/C++/loop new file mode 100644 index 0000000..e8c4c58 --- /dev/null +++ b/C++/loop @@ -0,0 +1,17 @@ +//Take 10 integers from keyboard using loop and print their average value on the screen. +#include +int main() +{ + using namespace std; + int sum; + float avg; + for(int i=1;i<=10;i++) + { + int a; + cout<<"enter the value of a= \n"; + cin>>a; + sum=sum+a; + } + cout<<"the average of the number you enter is= \n"<