Write a C program which will take numbers from the keyboard until the sum of these numbers is greater than 100 . On monitor display the sum min and average of numbers
#include <iostream>
#include <string>
using namespace std;
int main() {
string last, first, middle;
int age;
string birthday;
string gender;
string address;
cout << "Enter you lastname: ";
cin >> last;
cout << "Enter you firstname: ";
cin >> first;
cout << "Enter you middlename: ";
cin >> middle;
cout << "Enter your birthday: ";
cin >> ws;
getline(cin, birthday);
cout << "Enter your age: ";
cin >> age;
cout << "Enter your gender: ";
cin >> gender;
cout << "Enter your permanent address: ";
cin >> ws;
getline(cin, address);
cout << "Hello " << first << " " << middle << " " << last << endl;
cout << "Your birthday is " << birthday
<< " and now you are " << age << " years old." << endl;
cout << "You are " << gender << endl;
cout << "and you live at " << address << endl;
return 0;
With explanation
Write a C program which will take an integer number from keyboard and display its digits on separate lines on monintor using a loop
Exercise 1.1 : Base and ASCII representation of character representation Print the decimal, octal and hexadecimal value of all characters between the start ad stop characters entered by a user. for example, if the user enters an ’A’ and ’H’, the program should print all the characters between ’A’ and ’H’ and their respective values in the different bases (decimal, octal, and hexadecimal) as follows ASCII Representation of D is 68 in Decimal 104 in Octal and 44 in Hexadecimal ASCII Representation of E is 69 in Decimal 105 in Octal and 45 in Hexadecimal ASCII Representation of F is 70 in Decimal 106 in Octal and 46 in Hexadecimal ASCII Representation of G is 71 in Decimal 107 in Octal and 47 in Hexadecimal ASCII Representation of H is 72 in Decimal 110 in Octal and 48 in Hexadecimal ASCII Representation of I is 73 in Decimal 111 in Octal and 49 in Hexadecimal ASCII Representation of J is 74 in Decimal 112 in Octal and 4A in Hex
write a C program which will print following pattern on monitor
*
**
***
****
*****
******
Write a C program which will take numbers from the keyboard until user enter the negative number and display the max of these numbers
using
-while loop
-do while loop
Write a C program which will take 30 numbers from the keyboard and display the min of these numbers . By using
•for loop
•while loop
•do while loop
Write a C program which will print the pattern on monitor , the integer N will be taken from key board
1
12
123
1234
12345
_____
_____
12345____n
Come up with the remaining loop , flow , and example on each one .
1.while loop
2.do while loop
3.infinite loop
sum of powers:
you are given a list of integers L of size N.write a program to compute the value of SUM
SUM=x1pow1+x2pow2+x3pow3+---+xNpowN
where xi concatenated with powi is the i th element of the list L
and powj is a single digit number
i/p: the input contains space separated N integers
the o/p should be a single integer denoting SUM
L=[25]
o/p:x1=2 , pow1=5
SUM=2^5=32
i/p: 132 301
o/p:199