- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 3
- Posts with Downvotes
- 1
- Downvoting Members
- 3
5 Posted Topics
Re: 'string' is not a datatype, so str naturally becomes a invalid variable. try this... [CODE] #include<conio.h> #include<string.h> #include<iostream.h> void main() { char str[] = "My name is shridhar"; cout<<"What is your name"<<str; getch(); }[/CODE] | |
Re: #include <iostream> using namespace std; int main(){ int first = 0; int second = 0; int value = 0; cout << "Enter first Integer: "; cin >> first; cout << "Enter second Integer: "; cin >> second; for (; first <= second; first++) { value += first; } cout << … | |
Re: int a[] = {1,2,3,4,5,6}; int n = sizeof(a) / sizeof(a[0]); //returns Size of the array | |
Re: int a,b,c; a=b=c=0; do { cout<<"Enter 2 numbers:"; cin>>a; cin>>b; c=a-b; }while(c>0); | |
Re: int x=5674876; int sum=0; do { sum += (x%10); x /= 10; }while(x>0); cout<<"Sum="<<sum; |
The End.