hello,
i want write a simple programe wich count the number of the chrechtar
this is my code
#include <iostream>
using namespace std;
int main()
{
int count = 0;
char str[30];
cout << "enter a word: " << endl;
cin >> str;
for (int x = 0; x <30; x++)
if(str[x]){
count++;
}
cout << count;
return 0;
}
second questions: the user should input two numbers and then i have two find all the numbers between them, then find their product
Sample run: Enter first number: 2
Enter second number: 6
2 3 4 5 6
Product = 720
this is my code but not comblete
#include <iostream>
using namespace std;
int main()
{
int num1,num2;
cout<<"Please enter two numbers: " << endl;
cin >> num1 >> num2;
for(int i; num1 > num2; i++)
cout << i;
return 0;
}
i coulnd't do it :(