Posts

Showing posts with the label Input output

C++ basic input output

Image
1.Star pattern with simple input output  #include<iostream> using namespace std; int main() {   cout<<"*\n"<<"**\n"<<"***\n"<<"****\n"<<"*****\n"<<endl;   return 0; } Output: 2.Character input output #include <iostream> using namespace std; int main() {     char name[50];     cout<<"Enter name:";     cin>>name;     cout<<"Hello "<<name<<"!";     return 0; } Output: 3.Simple input output #include <iostream> using namespace std; int main() {     int x;     int y;     float z;     x=10;     y=15;     z=12.6;     cout<<x<<" "<<y<<" "<<z<<endl;     return 0; } Output: 4...