當前位置:編程學習大全網 - 編程軟體 - c++編程 我想要輸入三個數 30 45 60 怎樣使輸入的數為角度制 程序中我少用了什麽東西

c++編程 我想要輸入三個數 30 45 60 怎樣使輸入的數為角度制 程序中我少用了什麽東西

這個輸入,已經是可以的,只是

40<回車>

50<回車>

60<回車>

這樣友好壹些

#include?<iostream>

#include?<cmath>

#include?<iomanip>

using?namespace?std;

void?main(){

double?a1,?a2,?a3;

cout?<<?"Enter?1st?angles?(in?degree):?";

cin?>>?a1;

cout?<<?"Enter?2nd?angles?(in?degree):?";

cin?>>?a2;

cout?<<?"Enter?3th?angles?(in?degree):?";

cin?>>?a3;

cout?<<?setprecision(3)?<<?fixed;

cout?<<?"AngleSin()Tan()?"?<<?endl;

cout?<<?setw(8)?<<?a1?<<?setw(8)?<<?sin(a1)?<<?setw(8)?<<?tan(a1)?<<?endl;

cout?<<?setw(8)?<<?a2?<<?setw(8)?<<?sin(a2)?<<?setw(8)?<<?tan(a2)?<<?endl;

cout?<<?setw(8)?<<?a3?<<?setw(8)?<<?sin(a3)?<<?setw(8)?<<?tan(a3)?<<?endl;

}

  • 上一篇:精雕軟件,igs文件雕三維圖。同壹個igs文件,分層為什麽沒有梯度?是豎直的? 是我沒有選完嗎?
  • 下一篇:為什麽有人說鴻蒙是改頭換面的安卓?
  • copyright 2024編程學習大全網