Posts

Showing posts with the label Keyboard

✔ Go lang ⚡ Reading user input from keyboard or stdin 🔥 Tecq Mate Tutorials

Image
package main import "bufio" import "os" func main(){ rd := bufio.NewReader(os.Stdin) print("type & enter: ") ln, er := rd.ReadString('\n') if nil != er { panic(er) } print("you entered: ", ln) }

✔ Learn C in 2 hours ⚡ C Programming for beginners 🔥 Tecq Mate Tutorials ✌

Image

Cpp structure program for pizza details company name, pizza diameter and weight

Image
tecqmate.cpp #include<iostream> #include<string> using namespace std; typedef struct { string company_name; float pizza_diameter; float pizza_weight; }pizza_info; int main(){ pizza_info pi; cout << "Enter Pizza Info" << endl; cout << "Company name: "; getline(cin, pi.company_name); cout << "Pizza diameter: "; cin >> pi.pizza_diameter; cout << "Pizza weight: "; cin >> pi.pizza_weight; cout << endl << "Pizza Details" << endl; cout << "Company name: " << pi.company_name << endl;; cout << "Pizza diameter: " << pi.pizza_diameter << endl;; cout << "Pizza weight: " << pi.pizza_weight << endl;; return 0; } Download code here

PHP read user input from console | PHP feed numbers from keyboard | No readline()

Image
Download code here .