+ 3
What is mistake in the program..
/* C++ Programming Examples */ #include<iostream.h> #include<conio.h> void main() { clrscr(); char str[20]; cout<<"Enter your name : "; cin>>str; cout<<"Hello, "<<str<<" Sir, You are at codescracker.com"; getch(); }
6 odpowiedzi
+ 9
1. Use <iostream> instead of <iostream.h> as modern compilers don't support '.h' format
2. Remove #include <conio.h> as it is no more used.
3. Add a line using namespace std; before main ().
4. Remove clrscr () as not supported in modern compilers
5. Use getline (str,cin) instead of cin>>str in order to read multiple words string
6. Lastly remove getch ()
+ 10
As for why your code isn't working:
https://www.sololearn.com/Discuss/288609/?ref=app
+ 8
Thanks @Serena for pointing out
+ 2
thanks sir..
0
#include <iostream.h>
#include<conio.h>
void main ( )
{
clrscr( );
cout <<“Welcome to University of Engineering And Technology Taxila please solve this